create table jobs (
- jobid char(32) binary not null,
- dg_jobid varchar(255) binary not null,
- ownerid char(32) binary not null,
- aclid char(32) binary null,
- ps varchar(255) not null,
+ `jobid` char(32) binary not null,
+ `dg_jobid` varchar(255) binary not null,
+ `ownerid` char(32) binary not null,
+ `aclid` char(32) binary null,
+ `ps` varchar(255) not null,
- primary key (jobid),
- unique (dg_jobid),
- index (jobid),
+ primary key (jobid),
+ unique (dg_jobid),
+ index (jobid),
index (dg_jobid)
);
create table attrs (
- attrid char(32) binary not null,
- name varchar(255) binary not null,
- indexed int not null,
- type char(32) binary null,
+ `attrid` char(32) binary not null,
+ `name` varchar(255) binary not null,
+ `indexed` int not null,
+ `type` char(32) binary null,
- primary key (attrid),
- index (attrid),
+ primary key (attrid),
+ index (attrid),
index (name)
);
create table feeds (
- uniqueid int auto_increment not null,
- feedid char(32) binary unique,
- state int not null,
- locked int not null,
- source varchar(255) not null,
- expires datetime,
- conditions mediumblob null,
+ `uniqueid` int auto_increment not null,
+ `feedid` char(32) binary unique,
+ `state` int not null,
+ `locked` int not null,
+ `source` varchar(255) not null,
+ `expires` datetime,
+ `condition` mediumblob null,
primary key (uniqueid),
index (uniqueid),
);
create table acls (
- aclid char(32) binary not null,
- value mediumblob not null,
- refcnt int not null,
+ `aclid` char(32) binary not null,
+ `value` mediumblob not null,
+ `refcnt` int not null,
primary key (aclid)
);
create table users (
- userid char(32) binary not null,
- cert_subj varchar(255) binary not null,
+ `userid` char(32) binary not null,
+ `cert_subj` varchar(255) binary not null,
primary key (userid),
unique (cert_subj)
# value is created only for attributes configured to be indexed
#
#create table attr_<attrid> (
-# jobid char(32) binary not null,
-# value varchar(255) binary not null,
-# full_value mediumblob not null,
-# origin int not null,
+# `jobid` char(32) binary not null,
+# `value` varchar(255) binary not null,
+# `full_value` mediumblob not null,
+# `origin` int not null,
#
# index (jobid),
# index (value)
#define TABLE_PREFIX_DATA "attr_"
#define SQLCMD_DROP_DATA_TABLE "DROP TABLE " TABLE_PREFIX_DATA "%s"
#define SQLCMD_CREATE_DATA_TABLE "CREATE TABLE " TABLE_PREFIX_DATA "%s (\n\
- jobid CHAR(32) BINARY NOT NULL,\n\
- value %s BINARY NOT NULL,\n\
- full_value %s NOT NULL,\n\
- origin INT NOT NULL,\n\
+ `jobid` CHAR(32) BINARY NOT NULL,\n\
+ `value` %s BINARY NOT NULL,\n\
+ `full_value` %s NOT NULL,\n\
+ `origin` INT NOT NULL,\n\
\n\
INDEX (jobid),\n\
INDEX (value)\n\
GLITE_JP_DB_TYPE_INT, &locked,
GLITE_JP_DB_TYPE_VARCHAR, source, &source_len,
GLITE_JP_DB_TYPE_MEDIUMBLOB, dbconds, &dbconds_len);
- if (glite_jp_db_prepare(jpctx, "INSERT INTO feeds (state, locked, source, conditions) VALUES (?, ?, ?, ?)", &stmt, param, NULL) != 0) goto fail;
+ if (glite_jp_db_prepare(jpctx, "INSERT INTO feeds (state, locked, source, condition) VALUES (?, ?, ?, ?)", &stmt, param, NULL) != 0) goto fail;
feeds = ctx->conf->feeds;
i = 0;
if (feeds) while (feeds[i]) {