Skip to content

Commit

Permalink
[fix] rename sql file
Browse files Browse the repository at this point in the history
  • Loading branch information
hikahana committed Dec 15, 2024
1 parent d83204b commit 4435518
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 8 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ CREATE TABLE financial_records (
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
FOREIGN KEY year_id_foreign_key (year_id) REFERENCES financial_records (id)
FOREIGN KEY year_id_foreign_key (year_id) REFERENCES years (id)
);
2 changes: 1 addition & 1 deletion mysql/db/divisions.sql → mysql/db/04_divisions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ CREATE TABLE divisions (
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
FOREIGN KEY financial_record_id_foreign_key (financial_record_id) REFERENCES divisions (id)
FOREIGN KEY financial_record_id_foreign_key (financial_record_id) REFERENCES financial_records (id)
);
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ CREATE TABLE festival_items (
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
FOREIGN KEY division_id_foreign_key (division_id) REFERENCES festival_items (id)
FOREIGN KEY division_id_foreign_key (division_id) REFERENCES divisions (id)
);
2 changes: 1 addition & 1 deletion mysql/db/item_budgets.sql → mysql/db/06_item_budgets.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ CREATE TABLE item_budgets (
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
FOREIGN KEY festival_item_id_foreign_key (festival_item_id) REFERENCES item_budgets (id)
FOREIGN KEY festival_item_id_foreign_key (festival_item_id) REFERENCES festival_items (id)
);
4 changes: 2 additions & 2 deletions mysql/db/user_groups.sql → mysql/db/07_user_groups.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ CREATE TABLE user_groups (
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id),
FOREIGN KEY user_id_foreign_key (user_id) REFERENCES user_groups (id)
FOREIGN KEY group_id_foreign_key (group_id) REFERENCES user_groups (id)
FOREIGN KEY user_id_foreign_key (user_id) REFERENCES users (id)
FOREIGN KEY group_id_foreign_key (group_id) REFERENCES divisions (id)
);
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ CREATE TABLE payment_receipts (
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
FOREIGN KEY buy_report_id_foreign_key (buy_report_id) REFERENCES payment_receipts (id)
FOREIGN KEY buy_report_id_foreign_key (buy_report_id) REFERENCES buy_reports (id)
);
2 changes: 1 addition & 1 deletion mysql/db/buy_statuses.sql → mysql/db/10_buy_statuses.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ CREATE TABLE buy_statuses (
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
FOREIGN KEY buy_report_id_foreign_key (buy_report_id) REFERENCES buy_statuses (id)
FOREIGN KEY buy_report_id_foreign_key (buy_report_id) REFERENCES buy_reports (id)
);

0 comments on commit 4435518

Please sign in to comment.