Parser::MySQL to handle CHECK CONSTRAINT
[dbsrgits/SQL-Translator.git] / t / data / mysql / create2.sql
CommitLineData
fb3e4caf 1create table person (
2 person_id INTEGER PRIMARY KEY AUTO_INCREMENT,
3 name varchar(20) not null,
4 age integer default '18',
5 weight double(11,2),
6 iq int default '0',
7 is_rock_star tinyint default '1',
4d438549 8 physical_description text,
9 UNIQUE KEY UC_person_id (person_id),
10 UNIQUE KEY UC_age_name (age, name)
fb3e4caf 11) ENGINE=InnoDB;
12
d990d84b 13create unique index unique_name on person (name);
9ae898b9 14
15create table employee (
16 position varchar(50),
17 employee_id INTEGER,
6a0f3000 18 CONSTRAINT FK5302D47D93FE702E_diff FOREIGN KEY (employee_id) REFERENCES person (person_id),
51fe887d 19 CONSTRAINT `demo_constraint` CHECK (`employee_id` > 0 and `employee_id` IS NOT NULL and `employee_id` not in (0)),
6a0f3000 20 PRIMARY KEY (employee_id, position)
9ae898b9 21) ENGINE=InnoDB;
4d438549 22
23create table added (
24 id integer
25);
26