Skip to content

Commit

Permalink
add constraint to charity_stream table
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMartineau committed Aug 16, 2024
1 parent 7550b3d commit 8b6047a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions migration/create_table_widget_alert_box.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CREATE TABLE widget_alert_box (
sound_volume INT NOT NULL, -- Volume du son (0 à 100)
creation_date TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), -- Date de création avec précision à la microseconde
last_update TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) NOT NULL -- Date de dernière mise à jour avec précision à la microseconde
CONSTRAINT fk_charity_stream_guid_donation_goal_bar FOREIGN KEY (charity_stream_guid) REFERENCES charity_stream(guid)
);

CREATE INDEX idx_charity_stream_id ON widget_alert_box(charity_stream_id);
Expand Down
1 change: 1 addition & 0 deletions migration/create_table_widget_donation_goal_bar.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CREATE TABLE widget_donation_goal_bar (
goal INT NOT NULL, -- Objectif de dons, représenté par un entier
creation_date TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), -- Date de création avec précision à la microseconde
last_update TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) NOT NULL -- Date de dernière mise à jour avec précision à la microseconde
CONSTRAINT fk_charity_stream_guid_donation_goal_bar FOREIGN KEY (charity_stream_guid) REFERENCES charity_stream(guid)
);


Expand Down

0 comments on commit 8b6047a

Please sign in to comment.