You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dc24f2e
Browse filesBrowse the repository at this point in the historyBrowse files
drop = name => $"DROP DATABASE IF EXISTS `{name}`";
2716
2716
sourceSql = new[]
2717
2717
{
2718
-
"CREATE TABLE parent (id INT PRIMARY KEY, code VARCHAR(20) NOT NULL, note VARCHAR(50) NULL)",
2718
+
"CREATE TABLE parent (id INT PRIMARY KEY, code VARCHAR(20) NOT NULL, note VARCHAR(50) NULL, KEY ix_parent_code (code(8), id DESC))",
2719
2719
"CREATE TABLE child (id INT PRIMARY KEY, parent_id INT NOT NULL, amount DECIMAL(10,2) NOT NULL DEFAULT 0, KEY ix_child_parent (parent_id), CONSTRAINT fk_child_parent FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE)",
2720
2720
"CREATE TABLE extra_table (id INT PRIMARY KEY AUTO_INCREMENT, label VARCHAR(30) COLLATE utf8mb4_bin NULL, parent_id INT NULL, KEY ix_extra_label (label), CONSTRAINT fk_extra_parent FOREIGN KEY (parent_id) REFERENCES parent(id))",
2721
2721
"INSERT INTO extra_table (label) VALUES ('seed')",
0 commit comments