Lines 3239-3246
CREATE TABLE categories_branches( -- association table between categories and br
Link Here
|
3239 |
|
3239 |
|
3240 |
DROP TABLE IF EXISTS authorised_values_branches; |
3240 |
DROP TABLE IF EXISTS authorised_values_branches; |
3241 |
CREATE TABLE authorised_values_branches( -- association table between authorised_values and branches |
3241 |
CREATE TABLE authorised_values_branches( -- association table between authorised_values and branches |
3242 |
av_id INTEGER, |
3242 |
av_id INT(11) NOT NULL, |
3243 |
branchcode VARCHAR(10), |
3243 |
branchcode VARCHAR(10) NOT NULL, |
3244 |
FOREIGN KEY (av_id) REFERENCES authorised_values(id) ON DELETE CASCADE, |
3244 |
FOREIGN KEY (av_id) REFERENCES authorised_values(id) ON DELETE CASCADE, |
3245 |
FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE |
3245 |
FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE |
3246 |
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
3246 |
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
3247 |
- |
|
|