summaryrefslogtreecommitdiffstats
path: root/schema/mysql-migrations/upgrade_178.sql
blob: 589e6043b16b82d3e42b6f8bc58f896e6a33b2cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CREATE TABLE director_activity_log_remark (
  first_related_activity BIGINT(20) UNSIGNED NOT NULL,
  last_related_activity BIGINT(20) UNSIGNED NOT NULL,
  remark TEXT NOT NULL,
  PRIMARY KEY (first_related_activity, last_related_activity),
  CONSTRAINT activity_log_remark_begin
    FOREIGN KEY first_related_activity (first_related_activity)
      REFERENCES director_activity_log (id)
      ON DELETE CASCADE
      ON UPDATE CASCADE,
  CONSTRAINT activity_log_remark_end
    FOREIGN KEY last_related_activity (last_related_activity)
      REFERENCES director_activity_log (id)
      ON DELETE CASCADE
      ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO director_schema_migration
  (schema_version, migration_time)
  VALUES ('178', NOW());