sea-orm/issues/630/create_underscores_table.sql
Billy Chan 840f8f6148
DeriveEntityModel macros override column name (#695)
* Override column name with the name of model field in `DeriveEntityModel` macros [issues]

* Fixup: trim prefix and tailing underscore

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-05-09 22:08:59 +08:00

18 lines
363 B
SQL

CREATE TABLE underscores (
`id` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
`a_b_c_d` INT NOT NULL,
`a_b_c_dd` INT NOT NULL,
`a_b_cc_d` INT NOT NULL,
`a_bb_c_d` INT NOT NULL,
`aa_b_c_d` INT NOT NULL
);
INSERT INTO underscores (
`a_b_c_d`,
`a_b_c_dd`,
`a_b_cc_d`,
`a_bb_c_d`,
`aa_b_c_d`
)
VALUES (1, 2, 3, 4, 5);