diff --git a/migration/create_table_widget_alert_box.sql b/migration/create_table_widget_alert_box.sql index 62c99d6..5c6061d 100644 --- a/migration/create_table_widget_alert_box.sql +++ b/migration/create_table_widget_alert_box.sql @@ -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); diff --git a/migration/create_table_widget_donation_goal_bar.sql b/migration/create_table_widget_donation_goal_bar.sql index 959de1a..ed7dcc7 100644 --- a/migration/create_table_widget_donation_goal_bar.sql +++ b/migration/create_table_widget_donation_goal_bar.sql @@ -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) );