diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/downgrade_0057---0056.sql | 5 | ||||
-rw-r--r-- | db/downgrade_0058---0057.sql | 5 | ||||
-rw-r--r-- | db/downgrade_0059---0058.sql | 5 | ||||
-rw-r--r-- | db/downgrade_0060---0059.sql | 5 | ||||
-rw-r--r-- | db/downgrade_0061---0060.sql | 5 | ||||
-rw-r--r-- | db/downgrade_0062---0061.sql | 6 | ||||
-rw-r--r-- | db/schema.sql | 9 | ||||
-rw-r--r-- | db/schema_0057-fetch-problems.sql | 5 | ||||
-rw-r--r-- | db/schema_0058-blank-updates-permitted.sql | 5 | ||||
-rw-r--r-- | db/schema_0059-response-templates-external_status_code.sql | 5 | ||||
-rw-r--r-- | db/schema_0060-add-convert_latlong.sql | 5 | ||||
-rw-r--r-- | db/schema_0061-add-extra-body.sql | 5 | ||||
-rw-r--r-- | db/schema_0062-add-user-created-last-active.sql | 7 |
13 files changed, 71 insertions, 1 deletions
diff --git a/db/downgrade_0057---0056.sql b/db/downgrade_0057---0056.sql new file mode 100644 index 000000000..a87488e41 --- /dev/null +++ b/db/downgrade_0057---0056.sql @@ -0,0 +1,5 @@ +BEGIN; + +ALTER TABLE body DROP fetch_problems; + +COMMIT; diff --git a/db/downgrade_0058---0057.sql b/db/downgrade_0058---0057.sql new file mode 100644 index 000000000..1ce8f527c --- /dev/null +++ b/db/downgrade_0058---0057.sql @@ -0,0 +1,5 @@ +BEGIN; + +ALTER TABLE body DROP blank_updates_permitted; + +COMMIT; diff --git a/db/downgrade_0059---0058.sql b/db/downgrade_0059---0058.sql new file mode 100644 index 000000000..d312f10b4 --- /dev/null +++ b/db/downgrade_0059---0058.sql @@ -0,0 +1,5 @@ +BEGIN; + +ALTER TABLE response_templates DROP external_status_code; + +COMMIT; diff --git a/db/downgrade_0060---0059.sql b/db/downgrade_0060---0059.sql new file mode 100644 index 000000000..67ba29eb1 --- /dev/null +++ b/db/downgrade_0060---0059.sql @@ -0,0 +1,5 @@ +BEGIN; + +ALTER TABLE body DROP convert_latlong; + +COMMIT; diff --git a/db/downgrade_0061---0060.sql b/db/downgrade_0061---0060.sql new file mode 100644 index 000000000..d6934b9b0 --- /dev/null +++ b/db/downgrade_0061---0060.sql @@ -0,0 +1,5 @@ +BEGIN; + +ALTER TABLE body DROP extra; + +COMMIT; diff --git a/db/downgrade_0062---0061.sql b/db/downgrade_0062---0061.sql new file mode 100644 index 000000000..fa958169a --- /dev/null +++ b/db/downgrade_0062---0061.sql @@ -0,0 +1,6 @@ +BEGIN; + +ALTER TABLE users DROP created; +ALTER TABLE users DROP last_active; + +COMMIT; diff --git a/db/schema.sql b/db/schema.sql index f2197dc52..30f5d3a30 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -30,6 +30,8 @@ create table users ( from_body integer, flagged boolean not null default 'f', is_superuser boolean not null default 'f', + created timestamp not null default current_timestamp, + last_active timestamp not null default current_timestamp, title text, twitter_id bigint unique, facebook_id bigint unique, @@ -54,7 +56,11 @@ create table body ( suppress_alerts boolean not null default 'f', can_be_devolved boolean not null default 'f', send_extended_statuses boolean not null default 'f', - deleted boolean not null default 'f' + fetch_problems boolean not null default 'f', + blank_updates_permitted boolean not null default 'f', + convert_latlong boolean not null default 'f', + deleted boolean not null default 'f', + extra text ); create table body_areas ( @@ -470,6 +476,7 @@ create table response_templates ( created timestamp not null default current_timestamp, auto_response boolean NOT NULL DEFAULT 'f', state text, + external_status_code text, unique(body_id, title) ); diff --git a/db/schema_0057-fetch-problems.sql b/db/schema_0057-fetch-problems.sql new file mode 100644 index 000000000..7419eb032 --- /dev/null +++ b/db/schema_0057-fetch-problems.sql @@ -0,0 +1,5 @@ +BEGIN; + +ALTER TABLE body ADD fetch_problems boolean default 'f' not null; + +COMMIT; diff --git a/db/schema_0058-blank-updates-permitted.sql b/db/schema_0058-blank-updates-permitted.sql new file mode 100644 index 000000000..8b6710bc0 --- /dev/null +++ b/db/schema_0058-blank-updates-permitted.sql @@ -0,0 +1,5 @@ +BEGIN; + +ALTER TABLE body ADD blank_updates_permitted boolean default 'f' not null; + +COMMIT; diff --git a/db/schema_0059-response-templates-external_status_code.sql b/db/schema_0059-response-templates-external_status_code.sql new file mode 100644 index 000000000..38b000a26 --- /dev/null +++ b/db/schema_0059-response-templates-external_status_code.sql @@ -0,0 +1,5 @@ +BEGIN; + +ALTER TABLE response_templates ADD external_status_code text; + +COMMIT; diff --git a/db/schema_0060-add-convert_latlong.sql b/db/schema_0060-add-convert_latlong.sql new file mode 100644 index 000000000..50c617e2c --- /dev/null +++ b/db/schema_0060-add-convert_latlong.sql @@ -0,0 +1,5 @@ +BEGIN; + +ALTER TABLE body ADD convert_latlong boolean default 'f' not null; + +COMMIT; diff --git a/db/schema_0061-add-extra-body.sql b/db/schema_0061-add-extra-body.sql new file mode 100644 index 000000000..125b171fb --- /dev/null +++ b/db/schema_0061-add-extra-body.sql @@ -0,0 +1,5 @@ +BEGIN; + +ALTER TABLE body ADD extra text; + +COMMIT; diff --git a/db/schema_0062-add-user-created-last-active.sql b/db/schema_0062-add-user-created-last-active.sql new file mode 100644 index 000000000..0e8875870 --- /dev/null +++ b/db/schema_0062-add-user-created-last-active.sql @@ -0,0 +1,7 @@ +BEGIN; + +ALTER TABLE users ADD created timestamp default current_timestamp not null; +ALTER TABLE users ADD last_active timestamp default current_timestamp not null; + +COMMIT; + |