summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEudyptula <eitan@mosenkis.net>2009-06-24 15:14:54 -0400
committerEudyptula <eitan@mosenkis.net>2009-06-24 15:14:54 -0400
commit607c68f2abe44a4d7838ef436a27696360e975fe (patch)
treee1080fc6c0dbcfa2aa4ba3e69c75538835081527
parentAdded merging changes in tables into already existing classes in update_sql_c... (diff)
downloadingenue-607c68f2abe44a4d7838ef436a27696360e975fe.tar.gz
ingenue-607c68f2abe44a4d7838ef436a27696360e975fe.tar.bz2
ingenue-607c68f2abe44a4d7838ef436a27696360e975fe.zip
Merged minor updates from SQL into sql_row_obj-based classes
-rw-r--r--shared/classes/build.php8
-rw-r--r--shared/classes/buildlog.php6
-rw-r--r--shared/classes/buildopt.php4
-rw-r--r--shared/classes/profile.php6
-rw-r--r--shared/classes/session.php10
-rw-r--r--shared/classes/user.php9
6 files changed, 29 insertions, 14 deletions
diff --git a/shared/classes/build.php b/shared/classes/build.php
index b290198..54631ee 100644
--- a/shared/classes/build.php
+++ b/shared/classes/build.php
@@ -1,17 +1,18 @@
<?php
class sql_build extends sql_row_obj {
- protected $table='builds', $ids='id owner', $columns=array(
+ protected $table='builds', $primary_key=array('id'), $columns=array(
'id' => array (
'type' => 'CHAR',
'length' => 6,
'not_null' => true,
- 'unique' => true
+ 'default' => ''
),
'owner' => array (
'type' => 'INT',
'length' => 10,
'unsigned' => true,
'not_null' => true,
+ 'default' => 0,
'refers to' => 'users.id'
),
'name' => array (
@@ -21,7 +22,8 @@ class sql_build extends sql_row_obj {
'status' => array (
'type' => 'VARCHAR',
'length' => 255,
- 'not_null' => true
+ 'not_null' => true,
+ 'default' => ''
),
'ctime' => array (
'type' => 'INT',
diff --git a/shared/classes/buildlog.php b/shared/classes/buildlog.php
index cfb9f3b..5ba95f6 100644
--- a/shared/classes/buildlog.php
+++ b/shared/classes/buildlog.php
@@ -4,13 +4,15 @@ class sql_buildlog extends sql_row_obj {
'build' => array (
'type' => 'CHAR',
'length' => 6,
- 'not_null' => true
+ 'not_null' => true,
+ 'default' => ''
),
'order' => array (
'type' => 'TINYINT',
'length' => 3,
'unsigned' => true,
- 'not_null' => true
+ 'not_null' => true,
+ 'default' => 0
),
'type' => array (
'type' => 'ENUM',
diff --git a/shared/classes/buildopt.php b/shared/classes/buildopt.php
index 4999585..92d24fd 100644
--- a/shared/classes/buildopt.php
+++ b/shared/classes/buildopt.php
@@ -5,12 +5,14 @@ class sql_buildopt extends sql_row_obj {
'type' => 'CHAR',
'length' => 6,
'not_null' => true,
+ 'default' => '',
'refers to' => 'builds.id'
),
'name' => array (
'type' => 'VARCHAR',
'length' => 255,
- 'not_null' => true
+ 'not_null' => true,
+ 'default' => ''
),
'value' => array (
'type' => 'TEXT'
diff --git a/shared/classes/profile.php b/shared/classes/profile.php
index 9694352..72f5262 100644
--- a/shared/classes/profile.php
+++ b/shared/classes/profile.php
@@ -4,7 +4,8 @@ class sql_profile extends sql_row_obj {
'pkgdir' => array (
'type' => 'VARCHAR',
'length' => 255,
- 'not_null' => true
+ 'not_null' => true,
+ 'default' => ''
),
'name' => array (
'type' => 'VARCHAR',
@@ -18,7 +19,8 @@ class sql_profile extends sql_row_obj {
'flags' => array (
'type' => 'VARCHAR',
'length' => 255,
- 'not_null' => true
+ 'not_null' => true,
+ 'default' => ''
)
);
diff --git a/shared/classes/session.php b/shared/classes/session.php
index 57804ed..19575fe 100644
--- a/shared/classes/session.php
+++ b/shared/classes/session.php
@@ -4,26 +4,30 @@ class sql_session extends sql_row_obj {
'id' => array (
'type' => 'VARCHAR',
'length' => 30,
- 'not_null' => true
+ 'not_null' => true,
+ 'default' => ''
),
'user' => array (
'type' => 'INT',
'length' => 10,
'unsigned' => true,
'not_null' => true,
+ 'default' => 0,
'refers to' => 'users.id'
),
'atime' => array (
'type' => 'INT',
'length' => 10,
'unsigned' => true,
- 'not_null' => true
+ 'not_null' => true,
+ 'default' => 0
),
'expire' => array (
'type' => 'INT',
'length' => 10,
'unsigned' => true,
- 'not_null' => true
+ 'not_null' => true,
+ 'default' => 0
)
);
diff --git a/shared/classes/user.php b/shared/classes/user.php
index aa09ae3..49c84c0 100644
--- a/shared/classes/user.php
+++ b/shared/classes/user.php
@@ -12,23 +12,26 @@ class sql_user extends sql_row_obj {
'type' => 'VARCHAR',
'length' => 255,
'not_null' => true,
+ 'default' => '',
'unique' => true
),
'name' => array (
'type' => 'VARCHAR',
'length' => 255,
- 'not_null' => true
+ 'not_null' => true,
+ 'default' => ''
),
'passhash' => array (
'type' => 'CHAR',
'length' => 40,
'not_null' => true,
- 'comment' => 'sha1'
+ 'default' => ''
),
'flags' => array (
'type' => 'VARCHAR',
'length' => 255,
- 'not_null' => true
+ 'not_null' => true,
+ 'default' => ''
)
);