From 91399d89dd6f1bd4447690fc6e87c2ffba81f2b4 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 11 Aug 2009 09:24:18 +1200 Subject: upgrade script for postgres --- db/08to09_pg.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 db/08to09_pg.sql (limited to 'db') diff --git a/db/08to09_pg.sql b/db/08to09_pg.sql new file mode 100644 index 000000000..892df4a39 --- /dev/null +++ b/db/08to09_pg.sql @@ -0,0 +1,2 @@ +// SQL commands to update an 0.8.x version of Laconica +// to 0.9.x. -- cgit v1.2.3-54-g00ecf From 002cc755b2a521486b0216e2d6f8a3952bda0bae Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 11 Aug 2009 09:25:13 +1200 Subject: change file.url to from a varchar(255) to varchar(2047) because urls get translated from tinyurl.com etc into their originals before saving and urls can be that long --- db/laconica.sql | 2 +- db/laconica_pg.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'db') diff --git a/db/laconica.sql b/db/laconica.sql index f01107176..ff8c4c13e 100644 --- a/db/laconica.sql +++ b/db/laconica.sql @@ -433,7 +433,7 @@ create table group_inbox ( create table file ( id integer primary key auto_increment, - url varchar(255) comment 'destination URL after following redirections', + url varchar(2047) comment 'destination URL after following redirections', mimetype varchar(50) comment 'mime type of resource', size integer comment 'size of resource when available', title varchar(255) comment 'title of resource when available', diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql index b5626d3f4..59300c8ca 100644 --- a/db/laconica_pg.sql +++ b/db/laconica_pg.sql @@ -450,7 +450,7 @@ create index group_inbox_created_idx on group_inbox using btree(created); create sequence file_seq; create table file ( id bigint default nextval('file_seq') primary key /* comment 'unique identifier' */, - url varchar(255) unique, + url varchar(2047) unique, mimetype varchar(50), size integer, title varchar(255), -- cgit v1.2.3-54-g00ecf From f4f13166f712153b704329804be5508d78437cdd Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 11 Aug 2009 09:38:17 +1200 Subject: Revert "change file.url to from a varchar(255) to varchar(2047)" This reverts commit 002cc755b2a521486b0216e2d6f8a3952bda0bae. mysql doesn't allow varchar > 255 chars reverting until have a working solution --- db/laconica.sql | 2 +- db/laconica_pg.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'db') diff --git a/db/laconica.sql b/db/laconica.sql index ff8c4c13e..f01107176 100644 --- a/db/laconica.sql +++ b/db/laconica.sql @@ -433,7 +433,7 @@ create table group_inbox ( create table file ( id integer primary key auto_increment, - url varchar(2047) comment 'destination URL after following redirections', + url varchar(255) comment 'destination URL after following redirections', mimetype varchar(50) comment 'mime type of resource', size integer comment 'size of resource when available', title varchar(255) comment 'title of resource when available', diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql index 59300c8ca..b5626d3f4 100644 --- a/db/laconica_pg.sql +++ b/db/laconica_pg.sql @@ -450,7 +450,7 @@ create index group_inbox_created_idx on group_inbox using btree(created); create sequence file_seq; create table file ( id bigint default nextval('file_seq') primary key /* comment 'unique identifier' */, - url varchar(2047) unique, + url varchar(255) unique, mimetype varchar(50), size integer, title varchar(255), -- cgit v1.2.3-54-g00ecf