Line | |
---|
1 | |
---|
2 | # This is a fix for InnoDB in MySQL >= 4.1.x |
---|
3 | # It "suspends judgement" for fkey relationships until are tables are set. |
---|
4 | SET FOREIGN_KEY_CHECKS = 0; |
---|
5 | |
---|
6 | #----------------------------------------------------------------------------- |
---|
7 | #-- member |
---|
8 | #----------------------------------------------------------------------------- |
---|
9 | |
---|
10 | DROP TABLE IF EXISTS `member`; |
---|
11 | |
---|
12 | |
---|
13 | CREATE TABLE `member` |
---|
14 | ( |
---|
15 | `id` INTEGER NOT NULL AUTO_INCREMENT, |
---|
16 | `created_at` DATETIME, |
---|
17 | `updated_at` DATETIME, |
---|
18 | PRIMARY KEY (`id`) |
---|
19 | )Type=InnoDB; |
---|
20 | |
---|
21 | #----------------------------------------------------------------------------- |
---|
22 | #-- authentication_pc_address |
---|
23 | #----------------------------------------------------------------------------- |
---|
24 | |
---|
25 | DROP TABLE IF EXISTS `authentication_pc_address`; |
---|
26 | |
---|
27 | |
---|
28 | CREATE TABLE `authentication_pc_address` |
---|
29 | ( |
---|
30 | `id` INTEGER NOT NULL AUTO_INCREMENT, |
---|
31 | `member_id` INTEGER, |
---|
32 | `pc_address` VARCHAR(128), |
---|
33 | `password` VARCHAR(32), |
---|
34 | PRIMARY KEY (`id`), |
---|
35 | UNIQUE KEY `authentication_pc_address_U_1` (`pc_address`), |
---|
36 | INDEX `authentication_pc_address_FI_1` (`member_id`), |
---|
37 | CONSTRAINT `authentication_pc_address_FK_1` |
---|
38 | FOREIGN KEY (`member_id`) |
---|
39 | REFERENCES `member` (`id`) |
---|
40 | )Type=InnoDB; |
---|
41 | |
---|
42 | # This restores the fkey checks, after having unset them earlier |
---|
43 | SET FOREIGN_KEY_CHECKS = 1; |
---|
Note: See
TracBrowser
for help on using the repository browser.