Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dax/jcl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rousselie <dax@happycoders.org>2009-02-17 23:04:45 +0300
committerDavid Rousselie <dax@happycoders.org>2009-02-17 23:04:45 +0300
commitf1509d66da4cec838621c01b3b553876744d304e (patch)
tree984b2728b968487d3bf4a0750fa839e057f481e2 /sqlobject_history
parentf1fda8d46f80bab43e068c1cdedd2a4ccb0d8a54 (diff)
Add upgrade sql scripts
Ignore-this: dd6070080d744fb40683f0ff4421bf9c darcs-hash:20090217200445-86b55-d3e2a47f7830be8d887e1101e4ca3e9e6912e3dd.gz
Diffstat (limited to 'sqlobject_history')
-rw-r--r--sqlobject_history/2008-11-09/Account_sqlite.sql2
-rw-r--r--sqlobject_history/2008-11-09/LegacyJID_sqlite.sql2
-rw-r--r--sqlobject_history/2008-11-09/PresenceAccount_sqlite.sql2
-rw-r--r--sqlobject_history/2008-11-09/User_sqlite.sql2
-rw-r--r--sqlobject_history/2008-11-09/upgrade_sqlite_2009-02-17.sql29
-rw-r--r--sqlobject_history/2009-02-17/Account_sqlite.sql14
-rw-r--r--sqlobject_history/2009-02-17/LegacyJID_sqlite.sql10
-rw-r--r--sqlobject_history/2009-02-17/PresenceAccount_sqlite.sql13
-rw-r--r--sqlobject_history/2009-02-17/User_sqlite.sql9
9 files changed, 79 insertions, 4 deletions
diff --git a/sqlobject_history/2008-11-09/Account_sqlite.sql b/sqlobject_history/2008-11-09/Account_sqlite.sql
index ecbe288..ff3e774 100644
--- a/sqlobject_history/2008-11-09/Account_sqlite.sql
+++ b/sqlobject_history/2008-11-09/Account_sqlite.sql
@@ -11,4 +11,4 @@ CREATE TABLE account (
lastlogin TIMESTAMP,
user_id INT CONSTRAINT user_id_exists REFERENCES user_table(id) ,
child_name VARCHAR (255)
-)
+);
diff --git a/sqlobject_history/2008-11-09/LegacyJID_sqlite.sql b/sqlobject_history/2008-11-09/LegacyJID_sqlite.sql
index 1d64b35..6ac2b77 100644
--- a/sqlobject_history/2008-11-09/LegacyJID_sqlite.sql
+++ b/sqlobject_history/2008-11-09/LegacyJID_sqlite.sql
@@ -7,4 +7,4 @@ CREATE TABLE legacy_j_id (
jid TEXT,
account_id INT CONSTRAINT account_id_exists REFERENCES account(id) ,
child_name VARCHAR (255)
-)
+);
diff --git a/sqlobject_history/2008-11-09/PresenceAccount_sqlite.sql b/sqlobject_history/2008-11-09/PresenceAccount_sqlite.sql
index 12fcd80..466b8b1 100644
--- a/sqlobject_history/2008-11-09/PresenceAccount_sqlite.sql
+++ b/sqlobject_history/2008-11-09/PresenceAccount_sqlite.sql
@@ -10,4 +10,4 @@ CREATE TABLE presence_account (
dnd_action INT,
offline_action INT,
child_name VARCHAR (255)
-)
+);
diff --git a/sqlobject_history/2008-11-09/User_sqlite.sql b/sqlobject_history/2008-11-09/User_sqlite.sql
index 2f4f731..a4b18bd 100644
--- a/sqlobject_history/2008-11-09/User_sqlite.sql
+++ b/sqlobject_history/2008-11-09/User_sqlite.sql
@@ -6,4 +6,4 @@ CREATE TABLE user_table (
jid TEXT,
has_received_motd BOOLEAN,
child_name VARCHAR (255)
-)
+);
diff --git a/sqlobject_history/2008-11-09/upgrade_sqlite_2009-02-17.sql b/sqlobject_history/2008-11-09/upgrade_sqlite_2009-02-17.sql
new file mode 100644
index 0000000..8aec2e4
--- /dev/null
+++ b/sqlobject_history/2008-11-09/upgrade_sqlite_2009-02-17.sql
@@ -0,0 +1,29 @@
+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_table_id INT CONSTRAINT user_table_id_exists REFERENCES user_table(id),
+ child_name VARCHAR (255)
+);
+INSERT INTO account SELECT * FROM account_backup;
+DROP TABLE account_backup;
+commit;
+
diff --git a/sqlobject_history/2009-02-17/Account_sqlite.sql b/sqlobject_history/2009-02-17/Account_sqlite.sql
new file mode 100644
index 0000000..2d949cc
--- /dev/null
+++ b/sqlobject_history/2009-02-17/Account_sqlite.sql
@@ -0,0 +1,14 @@
+-- Exported definition from 2009-02-17T13: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_table_id INT CONSTRAINT user_table_id_exists REFERENCES user_table(id),
+ child_name VARCHAR (255)
+);
diff --git a/sqlobject_history/2009-02-17/LegacyJID_sqlite.sql b/sqlobject_history/2009-02-17/LegacyJID_sqlite.sql
new file mode 100644
index 0000000..e3b5125
--- /dev/null
+++ b/sqlobject_history/2009-02-17/LegacyJID_sqlite.sql
@@ -0,0 +1,10 @@
+-- Exported definition from 2009-02-17T13: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)
+);
diff --git a/sqlobject_history/2009-02-17/PresenceAccount_sqlite.sql b/sqlobject_history/2009-02-17/PresenceAccount_sqlite.sql
new file mode 100644
index 0000000..1ebab4b
--- /dev/null
+++ b/sqlobject_history/2009-02-17/PresenceAccount_sqlite.sql
@@ -0,0 +1,13 @@
+-- Exported definition from 2009-02-17T13: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)
+);
diff --git a/sqlobject_history/2009-02-17/User_sqlite.sql b/sqlobject_history/2009-02-17/User_sqlite.sql
new file mode 100644
index 0000000..6578e6f
--- /dev/null
+++ b/sqlobject_history/2009-02-17/User_sqlite.sql
@@ -0,0 +1,9 @@
+-- Exported definition from 2009-02-17T13: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)
+);