summaryrefslogtreecommitdiffstats
path: root/schema/mysql-migrations/upgrade_66.sql
blob: 9ce2cd8f0ed2a341a5b059ebd96c8aa5d083ad1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
-- dropping old tables, as they have never been used

DROP TABLE import_row_modifier_setting;
DROP TABLE import_row_modifier;

CREATE TABLE import_row_modifier (
  id INT(10) UNSIGNED AUTO_INCREMENT NOT NULL,
  source_id INT(10) UNSIGNED NOT NULL,
  property_name VARCHAR(255) NOT NULL,
  provider_class VARCHAR(72) NOT NULL,
  priority SMALLINT UNSIGNED NOT NULL,
  PRIMARY KEY (id),
  KEY search_idx (property_name),
  CONSTRAINT row_modifier_import_source
    FOREIGN KEY source (source_id)
    REFERENCES import_source (id)
    ON DELETE CASCADE
    ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE import_row_modifier_setting (
  row_modifier_id INT UNSIGNED NOT NULL,
  setting_name VARCHAR(64) NOT NULL,
  setting_value TEXT DEFAULT NULL,
  PRIMARY KEY (row_modifier_id, setting_name),
  CONSTRAINT row_modifier_settings
    FOREIGN KEY row_modifier (row_modifier_id)
    REFERENCES import_row_modifier (id)
    ON DELETE CASCADE
    ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO director_schema_migration
  SET migration_time = NOW(),
      schema_version = 66;