rename user table to user_table to avoir postgresql keyword conflict
darcs-hash:20081109190705-86b55-036cd024b6e2e5c3871c256e794c60363915afa8.gz
This commit is contained in:
14
sqlobject_history/2008-11-08/Account_sqlite.sql
Normal file
14
sqlobject_history/2008-11-08/Account_sqlite.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- Exported definition from 2008-11-09T13:58:16
|
||||
-- Class jcl.model.account.Account
|
||||
-- Database: sqlite
|
||||
CREATE TABLE account (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT,
|
||||
jid TEXT,
|
||||
status TEXT,
|
||||
error TEXT,
|
||||
enabled BOOLEAN,
|
||||
lastlogin TIMESTAMP,
|
||||
user_id INT CONSTRAINT user_id_exists REFERENCES user(id) ,
|
||||
child_name VARCHAR (255)
|
||||
)
|
||||
10
sqlobject_history/2008-11-08/LegacyJID_sqlite.sql
Normal file
10
sqlobject_history/2008-11-08/LegacyJID_sqlite.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Exported definition from 2008-11-09T13:58:16
|
||||
-- Class jcl.model.account.LegacyJID
|
||||
-- Database: sqlite
|
||||
CREATE TABLE legacy_j_id (
|
||||
id INTEGER PRIMARY KEY,
|
||||
legacy_address TEXT,
|
||||
jid TEXT,
|
||||
account_id INT CONSTRAINT account_id_exists REFERENCES account(id) ,
|
||||
child_name VARCHAR (255)
|
||||
)
|
||||
13
sqlobject_history/2008-11-08/PresenceAccount_sqlite.sql
Normal file
13
sqlobject_history/2008-11-08/PresenceAccount_sqlite.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- Exported definition from 2008-11-09T13:58:16
|
||||
-- Class jcl.model.account.PresenceAccount
|
||||
-- Database: sqlite
|
||||
CREATE TABLE presence_account (
|
||||
id INTEGER PRIMARY KEY,
|
||||
chat_action INT,
|
||||
online_action INT,
|
||||
away_action INT,
|
||||
xa_action INT,
|
||||
dnd_action INT,
|
||||
offline_action INT,
|
||||
child_name VARCHAR (255)
|
||||
)
|
||||
9
sqlobject_history/2008-11-08/User_sqlite.sql
Normal file
9
sqlobject_history/2008-11-08/User_sqlite.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Exported definition from 2008-11-09T13:58:16
|
||||
-- Class jcl.model.account.User
|
||||
-- Database: sqlite
|
||||
CREATE TABLE user (
|
||||
id INTEGER PRIMARY KEY,
|
||||
jid TEXT,
|
||||
has_received_motd BOOLEAN,
|
||||
child_name VARCHAR (255)
|
||||
)
|
||||
30
sqlobject_history/2008-11-08/upgrade_sqlite_2008-11-09.sql
Normal file
30
sqlobject_history/2008-11-08/upgrade_sqlite_2008-11-09.sql
Normal file
@@ -0,0 +1,30 @@
|
||||
alter table user rename to user_table;
|
||||
begin transaction;
|
||||
CREATE TEMPORARY TABLE account_backup (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT,
|
||||
jid TEXT,
|
||||
status TEXT,
|
||||
error TEXT,
|
||||
enabled BOOLEAN,
|
||||
lastlogin TIMESTAMP,
|
||||
user_id INT CONSTRAINT user_id_exists REFERENCES user_table(id) ,
|
||||
child_name VARCHAR (255)
|
||||
);
|
||||
INSERT INTO account_backup SELECT * FROM account;
|
||||
DROP TABLE account;
|
||||
CREATE TABLE account (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT,
|
||||
jid TEXT,
|
||||
status TEXT,
|
||||
error TEXT,
|
||||
enabled BOOLEAN,
|
||||
lastlogin TIMESTAMP,
|
||||
user_id INT CONSTRAINT user_id_exists REFERENCES user_table(id) ,
|
||||
child_name VARCHAR (255)
|
||||
);
|
||||
INSERT INTO account SELECT * FROM account;
|
||||
DROP TABLE account_backup;
|
||||
commit;
|
||||
|
||||
14
sqlobject_history/2008-11-09/Account_sqlite.sql
Normal file
14
sqlobject_history/2008-11-09/Account_sqlite.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- Exported definition from 2008-11-09T13:58:34
|
||||
-- Class jcl.model.account.Account
|
||||
-- Database: sqlite
|
||||
CREATE TABLE account (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT,
|
||||
jid TEXT,
|
||||
status TEXT,
|
||||
error TEXT,
|
||||
enabled BOOLEAN,
|
||||
lastlogin TIMESTAMP,
|
||||
user_id INT CONSTRAINT user_id_exists REFERENCES user_table(id) ,
|
||||
child_name VARCHAR (255)
|
||||
)
|
||||
10
sqlobject_history/2008-11-09/LegacyJID_sqlite.sql
Normal file
10
sqlobject_history/2008-11-09/LegacyJID_sqlite.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Exported definition from 2008-11-09T13:58:34
|
||||
-- Class jcl.model.account.LegacyJID
|
||||
-- Database: sqlite
|
||||
CREATE TABLE legacy_j_id (
|
||||
id INTEGER PRIMARY KEY,
|
||||
legacy_address TEXT,
|
||||
jid TEXT,
|
||||
account_id INT CONSTRAINT account_id_exists REFERENCES account(id) ,
|
||||
child_name VARCHAR (255)
|
||||
)
|
||||
13
sqlobject_history/2008-11-09/PresenceAccount_sqlite.sql
Normal file
13
sqlobject_history/2008-11-09/PresenceAccount_sqlite.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- Exported definition from 2008-11-09T13:58:34
|
||||
-- Class jcl.model.account.PresenceAccount
|
||||
-- Database: sqlite
|
||||
CREATE TABLE presence_account (
|
||||
id INTEGER PRIMARY KEY,
|
||||
chat_action INT,
|
||||
online_action INT,
|
||||
away_action INT,
|
||||
xa_action INT,
|
||||
dnd_action INT,
|
||||
offline_action INT,
|
||||
child_name VARCHAR (255)
|
||||
)
|
||||
9
sqlobject_history/2008-11-09/User_sqlite.sql
Normal file
9
sqlobject_history/2008-11-09/User_sqlite.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Exported definition from 2008-11-09T13:58:34
|
||||
-- Class jcl.model.account.User
|
||||
-- Database: sqlite
|
||||
CREATE TABLE user_table (
|
||||
id INTEGER PRIMARY KEY,
|
||||
jid TEXT,
|
||||
has_received_motd BOOLEAN,
|
||||
child_name VARCHAR (255)
|
||||
)
|
||||
@@ -62,6 +62,9 @@ def mandatory_field(field_name, field_value):
|
||||
return field_value
|
||||
|
||||
class User(InheritableSQLObject):
|
||||
class sqlmeta:
|
||||
table = "user_table"
|
||||
|
||||
_connection = model.hub
|
||||
|
||||
jid = StringCol()
|
||||
|
||||
Reference in New Issue
Block a user