]> git.mjollnir.org Git - s9y.git/commitdiff
updated breakfast plugin for postgres
authorPenny Leach <penny@titania.local>
Sat, 26 May 2007 03:27:04 +0000 (15:27 +1200)
committerPenny Leach <penny@titania.local>
Sat, 26 May 2007 03:27:04 +0000 (15:27 +1200)
plugins/serendipity_plugin_breakfast/serendipity_plugin_breakfast.php

index 6ccfbf8a652d29ab3daaaebbadeda6d456e72642..8ab34edb15ad1c5b99caa2a006e5ab30171efb77 100644 (file)
@@ -120,50 +120,43 @@ echo '</td>
     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
 );',
                    );                   
     }