20230423211500_add_thing_notification_table.sql 380 B

123456789101112
  1. -- +goose Up
  2. CREATE TABLE thing_notification
  3. (
  4. thing_id INT PRIMARY KEY,
  5. notification_date TIMESTAMP NOT NULL,
  6. created_at TIMESTAMP NOT NULL DEFAULT NOW(),
  7. updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
  8. CONSTRAINT fk_thing_notification_thing_id FOREIGN KEY (thing_id) REFERENCES thing (id)
  9. );
  10. -- +goose Down
  11. DROP TABLE thing_notification;