Permalink
Browse files

Upgrade scripts pydio/internal-tracker#83

  • Loading branch information...
1 parent 5aa4d8f commit ee11ce6b5a068cd2694eb47b1f937d2fd03edf1e @ghecquet ghecquet committed Sep 23, 2016
@@ -1,23 +1,30 @@
-CREATE TABLE IF NOT EXISTS `ajxp_tasks` (
- `uid` varchar(255) NOT NULL,
- `type` int(11) NOT NULL,
- `parent_uid` varchar(255) DEFAULT NULL,
- `flags` int(11) NOT NULL,
- `label` varchar(255) NOT NULL,
- `userId` varchar(255) NOT NULL,
- `wsId` varchar(32) NOT NULL,
- `status` int(11) NOT NULL,
- `status_msg` mediumtext NOT NULL,
- `progress` int(11) NOT NULL,
- `schedule` int(11) NOT NULL,
- `schedule_value` varchar(255) DEFAULT NULL,
- `action` text NOT NULL,
- `parameters` mediumtext NOT NULL,
- `nodes` text NOT NULL,
- `creation_date` int(11) NOT NULL DEFAULT '0' COMMENT 'Date of creation of the job',
- `status_update` int(11) NOT NULL DEFAULT '0' COMMENT 'Last time the status was updated',
- PRIMARY KEY (`uid`),
- KEY `userId` (`userId`,`status`),
- KEY `type` (`type`),
- KEY `schedule` (`schedule`)
-) DEFAULT CHARSET=utf8 COMMENT='Task persistence layer';
+DROP TABLE IF EXISTS ajxp_tasks;
+
+CREATE TABLE IF NOT EXISTS ajxp_tasks (
+ uid VARCHAR(255) NOT NULL ,
+ type INTEGER NOT NULL,
+ parent_uid VARCHAR(255) DEFAULT NULL,
+ flags INTEGER NOT NULL,
+ label VARCHAR(255) NOT NULL,
+ user_id VARCHAR(255) NOT NULL,
+ ws_id VARCHAR(32) NOT NULL,
+ status INTEGER NOT NULL,
+ status_msg VARCHAR(500) NOT NULL,
+ progress INTEGER NOT NULL,
+ schedule INTEGER NOT NULL,
+ schedule_value VARCHAR(255) DEFAULT NULL,
+ action VARCHAR(255) NOT NULL,
+ parameters VARCHAR(500) NOT NULL,
+ nodes VARCHAR(500) NOT NULL,
+ creation_date INTEGER NOT NULL DEFAULT 0,
+ status_update INTEGER NOT NULL DEFAULT 0,
+
+ PRIMARY KEY (uid)
+);
+
+
+CREATE INDEX ajxp_task_usr_idx ON ajxp_tasks (user_id);
+CREATE INDEX ajxp_task_status_idx ON ajxp_tasks (status);
+CREATE INDEX ajxp_task_type ON ajxp_tasks (type);
+CREATE INDEX ajxp_task_schedule ON ajxp_tasks (schedule);
+CREATE INDEX ajxp_task_nodes_idx ON ajxp_tasks (nodes);
@@ -1,27 +1,30 @@
-CREATE TABLE ajxp_tasks (
- uid VARCHAR(255) NOT NULL ,
- type INTEGER NOT NULL,
- parent_uid VARCHAR(255) DEFAULT NULL,
- flags INTEGER NOT NULL,
- label VARCHAR(255) NOT NULL,
- userId VARCHAR(255) NOT NULL,
- wsId VARCHAR(32) NOT NULL,
- status INTEGER NOT NULL,
- status_msg VARCHAR(500) NOT NULL,
- progress INTEGER NOT NULL,
- schedule INTEGER NOT NULL,
- schedule_value VARCHAR (255) DEFAULT NULL,
- action VARCHAR(255) NOT NULL,
- parameters VARCHAR(500) NOT NULL,
- nodes VARCHAR(500) NOT NULL,
- creation_date INTEGER NOT NULL DEFAULT '0' COMMENT 'Date of creation of the job',
- status_update INTEGER NOT NULL DEFAULT '0' COMMENT 'Last time the status was updated',
+DROP TABLE IF EXISTS ajxp_tasks;
+
+CREATE TABLE IF NOT EXISTS ajxp_tasks (
+ uid VARCHAR(255) NOT NULL ,
+ type INTEGER NOT NULL,
+ parent_uid VARCHAR(255) DEFAULT NULL,
+ flags INTEGER NOT NULL,
+ label VARCHAR(255) NOT NULL,
+ user_id VARCHAR(255) NOT NULL,
+ ws_id VARCHAR(32) NOT NULL,
+ status INTEGER NOT NULL,
+ status_msg VARCHAR(500) NOT NULL,
+ progress INTEGER NOT NULL,
+ schedule INTEGER NOT NULL,
+ schedule_value VARCHAR(255) DEFAULT NULL,
+ action VARCHAR(255) NOT NULL,
+ parameters VARCHAR(500) NOT NULL,
+ nodes VARCHAR(500) NOT NULL,
+ creation_date INTEGER NOT NULL DEFAULT 0,
+ status_update INTEGER NOT NULL DEFAULT 0,
+
+ PRIMARY KEY (uid)
);
-CREATE INDEX ajxp_task_idx ON ajxp_tasks ('uid');
-CREATE INDEX ajxp_task_usr_idx ON ajxp_tasks ('userId');
-CREATE INDEX ajxp_task_status_idx ON ajxp_tasks ('status');
-CREATE INDEX ajxp_task_type ON ajxp_tasks ('type');
-CREATE INDEX ajxp_task_schedule ON ajxp_tasks ('schedule');
-CREATE INDEX ajxp_task_nodes_idx ON ajxp_tasks ('nodes');
+CREATE INDEX ajxp_task_usr_idx ON ajxp_tasks (user_id);
+CREATE INDEX ajxp_task_status_idx ON ajxp_tasks (status);
+CREATE INDEX ajxp_task_type ON ajxp_tasks (type);
+CREATE INDEX ajxp_task_schedule ON ajxp_tasks (schedule);
+CREATE INDEX ajxp_task_nodes_idx ON ajxp_tasks (nodes);
@@ -1,26 +1,30 @@
-CREATE TABLE ajxp_tasks (
- uid text NOT NULL ,
- type INTEGER NOT NULL,
- parent_uid text DEFAULT NULL,
- flags integer NOT NULL,
- label text NOT NULL,
- userId text NOT NULL,
- wsId text NOT NULL,
- status INTEGER NOT NULL,
- status_msg text NOT NULL,
- progress INTEGER NOT NULL,
- schedule INTEGER NOT NULL,
- schedule_value text DEFAULT NULL,
- action text NOT NULL,
- parameters text NOT NULL,
- nodes text NOT NULL,
- creation_date INTEGER NOT NULL DEFAULT 0,
- status_update INTEGER NOT NULL DEFAULT 0,
+DROP TABLE IF EXISTS ajxp_tasks;
+
+CREATE TABLE IF NOT EXISTS ajxp_tasks (
+ uid VARCHAR(255) NOT NULL ,
+ type INTEGER NOT NULL,
+ parent_uid VARCHAR(255) DEFAULT NULL,
+ flags INTEGER NOT NULL,
+ label VARCHAR(255) NOT NULL,
+ user_id VARCHAR(255) NOT NULL,
+ ws_id VARCHAR(32) NOT NULL,
+ status INTEGER NOT NULL,
+ status_msg VARCHAR(500) NOT NULL,
+ progress INTEGER NOT NULL,
+ schedule INTEGER NOT NULL,
+ schedule_value VARCHAR(255) DEFAULT NULL,
+ action VARCHAR(255) NOT NULL,
+ parameters VARCHAR(500) NOT NULL,
+ nodes VARCHAR(500) NOT NULL,
+ creation_date INTEGER NOT NULL DEFAULT 0,
+ status_update INTEGER NOT NULL DEFAULT 0,
+
+ PRIMARY KEY (uid)
);
-CREATE INDEX ajxp_task_idx ON ajxp_tasks (uid);
-CREATE INDEX ajxp_task_usr_idx ON ajxp_tasks (userId);
+
+CREATE INDEX ajxp_task_usr_idx ON ajxp_tasks (user_id);
CREATE INDEX ajxp_task_status_idx ON ajxp_tasks (status);
CREATE INDEX ajxp_task_type ON ajxp_tasks (type);
CREATE INDEX ajxp_task_schedule ON ajxp_tasks (schedule);
-CREATE INDEX ajxp_task_nodes_idx ON ajxp_tasks (nodes);
+CREATE INDEX ajxp_task_nodes_idx ON ajxp_tasks (nodes);
Oops, something went wrong.

0 comments on commit ee11ce6

Please sign in to comment.