Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r270 - trunk/current: admin db/mysql db/pysqlite

Project highlights: Stable Version: 1.6.1, Development Version: 1.7.6

current
Discussion topic

Back to topic list

svn commit: r270 - trunk/current: admin db/mysql db/pysqlite

Reply

Author jjneely
Full name Jack Neely
Date 2006-08-30 07:02:49 PDT
Message Author: jjneely
Date: 2006-08-30 07:02:49-0700
New Revision: 270

Modified:
   trunk/current/admin/search.py
   trunk/current/db/mys​ql/schema.py
   trunk/current/db/pys​qlite/schema.py

Log:
Pauline's fixes for using SHA1 hashes in the database, including the
PROFILE_QUEUE table schema as well.


Modified: trunk/current/admin/search.py
Url: http://current.tigri​s.org/source/browse/​current/trunk/curren​t/admin/search.py?vi​ew=diff&rev=270​&p1=trunk/current​/admin/search.py​&p2=trunk/current/ad​min/search.py&r1​=269&r2=270
====================​====================​====================​==================
--- trunk/current/admin/search.py (original)
+++ trunk/current/admin/search.py 2006-08-30 07:02:49-0700
@@ -8,11 +8,11 @@
 
     def run(self, server, session, argv):
         usage = "usage: %prog search"
- if len(argv) is not 0:
+ if len(argv) != 0:
             print usage
             sys.exit(1)
             
- result = self.call(server.cad​min.findProfile)
+ result = self.call(server.cad​min.findProfile, session)
         pprint.pprint(result)
     
     def name(self):

Modified: trunk/current/db/mys​ql/schema.py
Url: http://current.tigri​s.org/source/browse/​current/trunk/curren​t/db/mysql/schema.py​?view=diff&rev=2​70&p1=trunk/curr​ent/db/mysql/schema.​py&p2=trunk/curr​ent/db/mysql/schema.​py&r1=269&r2​=270
====================​====================​====================​==================
--- trunk/current/db/mys​ql/schema.py (original)
+++ trunk/current/db/mys​ql/schema.py 2006-08-30 07:02:49-0700
@@ -91,7 +91,7 @@
 drop table if exists SESSIONS;
 create table SESSIONS (
    session_id INTEGER PRIMARY KEY auto_increment,
- sid varchar(32) unique not null,
+ sid varchar(40) unique not null,
    createtime float not null,
    timeout float not null,
    data text,
@@ -113,11 +113,29 @@
     index(uuid)
 ) Type=InnoDB;
 
+drop table if exists PROFILE_QUEUE;
+create table PROFILE_QUEUE (
+ queue_id INTEGER PRIMARY KEY auto_increment,
+ profile_id int not null,
+ begindate datetime not null,
+ enddate datetime,
+ status int(1) not null,
+ method varchar(32) not null,
+ params text not null,
+ submit_code integer,
+ submit_msg varchar(64),
+ submit_data text,
+
+ index(profile_id)
+) Type=InnoDB;
+
 drop table if exists SUBSCRIPTIONS;
 create table SUBSCRIPTIONS (
     sub_id INTEGER PRIMARY KEY auto_increment,
     profile_id int not null,
- channel_id int not null
+ channel_id int not null,
+
+ index(profile_id)
 ) Type=InnoDB;
 
 drop table if exists USER;
@@ -151,7 +169,9 @@
     hardware_id INTEGER PRIMARY KEY auto_increment,
     profile_id int not null,
     class varchar(32),
- dict text
+ dict text,
+
+ index(profile_id)
 ) Type=InnoDB;
 
 drop table if exists INSTALLED;
@@ -159,9 +179,8 @@
     installed_id INTEGER PRIMARY KEY auto_increment,
     profile_id int not null,
     package_id int not null,
- info int(1) not null default '0',
+ info int(1) not null,
 
- index(package_id),
     index(profile_id)
 ) Type=InnoDB;
 """

Modified: trunk/current/db/pys​qlite/schema.py
Url: http://current.tigri​s.org/source/browse/​current/trunk/curren​t/db/pysqlite/schema​.py?view=diff&re​v=270&p1=trunk/c​urrent/db/pysqlite/s​chema.py&p2=trun​k/current/db/pysqlit​e/schema.py&r1=2​69&r2=270
====================​====================​====================​==================
--- trunk/current/db/pys​qlite/schema.py (original)
+++ trunk/current/db/pys​qlite/schema.py 2006-08-30 07:02:49-0700
@@ -72,7 +72,7 @@
 
 create table SESSIONS (
    session_id INTEGER PRIMARY KEY,
- sid varchar(32) unique not null,
+ sid varchar(40) unique not null,
    createtime float not null,
    timeout float not null,
    data text
@@ -91,11 +91,28 @@
 );
 create index PROFILE_IDX on PROFILE(uuid);
 
+create table PROFILE_QUEUE (
+ queue_id INTEGER PRIMARY KEY,
+ profile_id int not null,
+ begindate datetime not null,
+ enddate datetime,
+ status int(1) not null,
+ method varchar(32) not null,
+ params text not null,
+ submit_code integer,
+ submit_msg varchar(64),
+ submit_data text,
+
+ index(profile_id)
+);
+create index PROFILE_QUEUE_IDX on PROFILE_QUEUE(profile_id);
+
 create table SUBSCRIPTIONS (
     sub_id INTEGER PRIMARY KEY,
     profile_id int not null,
     channel_id int not null
 );
+create index SUBSCRIPTIONS_PROFILE_IDX on SUBSCRIPTIONS(profile_id);
 
 create table USER (
     user_id INTEGER PRIMARY KEY,
@@ -128,6 +145,7 @@
     class varchar(32),
     dict text
 );
+create index HARDWARE_PROFILE_IDX on INSTALLED(profile_id);
 
 create table INSTALLED (
     installed_id INTEGER PRIMARY KEY,
@@ -135,7 +153,6 @@
     package_id int not null,
     info int not null,
 );
-create index INSTALLED_PACKAGE_IDX on INSTALLED(package_id);
 create index INSTALLED_PROFILE_IDX on INSTALLED(profile_id);
 
 """

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r270 - trunk/current: admin db/mysql db/pysqlite jjneely Jack Neely 2006-08-30 07:02:49 PDT
Messages per page: