remove unused DB field task_result.title

This commit is contained in:
konovalovsergey
2017-01-23 20:04:37 +03:00
parent 3c9bc53d16
commit 44dea12c54
7 changed files with 18 additions and 29 deletions

View File

@ -77,7 +77,6 @@ CREATE TABLE IF NOT EXISTS `task_result` (
`status` tinyint(3) NOT NULL,
`status_info` int(10) NOT NULL,
`last_open_date` datetime NOT NULL,
`title` varchar(255) NOT NULL,
`user_index` int(10) unsigned NOT NULL DEFAULT 1,
`change_id` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)

View File

@ -38,14 +38,13 @@ CREATE TABLE IF NOT EXISTS "public"."task_result" (
"status" int2 NOT NULL,
"status_info" int4 NOT NULL,
"last_open_date" timestamp without time zone NOT NULL,
"title" varchar(255) COLLATE "default" NOT NULL,
"user_index" int4 NOT NULL DEFAULT 1,
"change_id" int4 NOT NULL DEFAULT 0,
PRIMARY KEY ("id")
)
WITH (OIDS=FALSE);
CREATE OR REPLACE FUNCTION merge_db(_id varchar(255), _status int2, _status_info int4, _last_open_date timestamp without time zone, _title varchar(255), _user_index int4, _change_id int4, OUT isupdate char(5), OUT userindex int4) AS
CREATE OR REPLACE FUNCTION merge_db(_id varchar(255), _status int2, _status_info int4, _last_open_date timestamp without time zone, _user_index int4, _change_id int4, OUT isupdate char(5), OUT userindex int4) AS
$$
DECLARE
t_var "public"."task_result"."user_index"%TYPE;
@ -62,7 +61,7 @@ BEGIN
-- if someone else inserts the same key concurrently,
-- we could get a unique-key failure
BEGIN
INSERT INTO "public"."task_result"(id, status, status_info, last_open_date, title, user_index, change_id) VALUES(_id, _status, _status_info, _last_open_date, _title, _user_index, _change_id) RETURNING user_index into userindex;
INSERT INTO "public"."task_result"(id, status, status_info, last_open_date, user_index, change_id) VALUES(_id, _status, _status_info, _last_open_date, _user_index, _change_id) RETURNING user_index into userindex;
isupdate := 'false';
RETURN;
EXCEPTION WHEN unique_violation THEN