ここの情報は古いです。ご理解頂いた上でお取り扱いください。

source: OpenPNE3/trunk/data/sql/lib.model.schema.sql @ 7815

Last change on this file since 7815 was 7815, checked in by ebihara, 13 years ago

#2848:AuthenticationPcAddressモデルを追加

File size: 1.2 KB
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.
4SET FOREIGN_KEY_CHECKS = 0;
5
6#-----------------------------------------------------------------------------
7#-- member
8#-----------------------------------------------------------------------------
9
10DROP TABLE IF EXISTS `member`;
11
12
13CREATE 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
25DROP TABLE IF EXISTS `authentication_pc_address`;
26
27
28CREATE 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
43SET FOREIGN_KEY_CHECKS = 1;
Note: See TracBrowser for help on using the repository browser.