function getcreatesql() {
return array(
'CREATE TABLE mbg_cafe (
- id int(10) not null auto_increment,
+ id SERIAL PRIMARY KEY,
name varchar(50) not null,
address varchar(100),
- url varchar(100),
- PRIMARY KEY (id)
+ url varchar(100)
);',
'CREATE TABLE mbg_meal (
- id int(10) not null auto_increment,
- name varchar(50),
- PRIMARY KEY (id)
+ id SERIAL PRIMARY KEY,
+ name varchar(50)
);',
'CREATE TABLE mbg_person (
- id int(10) not null auto_increment,
+ id SERIAL PRIMARY KEY,
name varchar(50) not null,
- alias varchar(100),
- PRIMARY KEY (id)
+ alias varchar(100)
);',
'CREATE TABLE mbg_event (
- id int(10) not null auto_increment,
- date int(10) not null,
- cafe int(10) not null,
- comment text,
- PRIMARY KEY (id)
+ id SERIAL PRIMARY KEY,
+ date integer not null,
+ cafe integer not null,
+ comment text
);',
'CREATE TABLE mbg_attendee (
- id int(10) not null auto_increment,
- event int(10) not null,
- person int(10) not null,
- ate int(10) not null,
- comment text,
- PRIMARY KEY (id)
+ id SERIAL PRIMARY KEY,
+ event integer not null,
+ person integer not null,
+ ate integer not null,
+ comment text
);',
'CREATE TABLE mbg_category (
- id int(10) not null auto_increment,
+ id SERIAL PRIMARY KEY,
category varchar(20) not null,
- weight int(2),
- PRIMARY KEY (id)
+ weight int2
);',
'CREATE TABLE mbg_score (
- id int(10) not null auto_increment,
- attendee int(10) not null,
- category int (10) not null,
- score int(2) not null,
- PRIMARY KEY (id)
+ id SERIAL PRIMARY KEY,
+ attendee integer not null,
+ category integer not null,
+ score int2 not null
);',
);
}