My table with column which has a int(11) generated (generation expression) virtual not null definition is getting sqlify'd to have the not null after int(11) instead of after the generated (generation expression) virtual/stored part, which is invalid in mysql.
Database Engine
mysql
To Reproduce
let table = `
create table \`d\`
(
\`id\` int (11) primary key auto_increment not null,
\`d_name\` varchar(15) not null,
\`d_id\` int(11) generated always as (cast(trim(d_name) as signed) ) virtual not null
);
`;
let ast = parser.astify(table)
// removed FKs from table's AST
// ...
return parser.sqlify(ast)
// returns column as `d_id` int(11) not null generated (...) virtual
Describe the bug
My table with column which has a int(11) generated (generation expression) virtual not null definition is getting sqlify'd to have the not null after int(11) instead of after the generated (generation expression) virtual/stored part, which is invalid in mysql.
Database Engine mysql
To Reproduce
-the node-sql-parser version: 5.3.3 -the node version: 20.15.1