diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/downgrade_0037---0036.sql | 1 | ||||
-rw-r--r-- | db/downgrade_0038---0037.sql | 2 | ||||
-rw-r--r-- | db/schema.sql | 12 | ||||
-rw-r--r-- | db/schema_0037-response-templates.sql | 8 | ||||
-rw-r--r-- | db/schema_0038-time-spent.sql | 2 |
5 files changed, 24 insertions, 1 deletions
diff --git a/db/downgrade_0037---0036.sql b/db/downgrade_0037---0036.sql new file mode 100644 index 000000000..39f73b308 --- /dev/null +++ b/db/downgrade_0037---0036.sql @@ -0,0 +1 @@ +drop table response_templates; diff --git a/db/downgrade_0038---0037.sql b/db/downgrade_0038---0037.sql new file mode 100644 index 000000000..11a0d11ad --- /dev/null +++ b/db/downgrade_0038---0037.sql @@ -0,0 +1,2 @@ +alter table admin_log + drop column time_spent; diff --git a/db/schema.sql b/db/schema.sql index 2db89bddb..72fccd7f3 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -427,7 +427,8 @@ create table admin_log ( action text not null, whenedited timestamp not null default current_timestamp, user_id int references users(id) null, - reason text not null default '' + reason text not null default '', + time_spent int not null default 0 ); create table moderation_original_data ( @@ -457,3 +458,12 @@ create table user_body_permissions ( ), unique(user_id, body_id, permission_type) ); + +create table response_templates ( + id serial not null primary key, + body_id int references body(id) not null, + title text not null, + text text not null, + created timestamp not null default current_timestamp, + unique(body_id, title) +); diff --git a/db/schema_0037-response-templates.sql b/db/schema_0037-response-templates.sql new file mode 100644 index 000000000..4534e1e84 --- /dev/null +++ b/db/schema_0037-response-templates.sql @@ -0,0 +1,8 @@ +create table response_templates ( + id serial not null primary key, + body_id int references body(id) not null, + title text not null, + text text not null, + created timestamp not null default current_timestamp, + unique(body_id, title) +); diff --git a/db/schema_0038-time-spent.sql b/db/schema_0038-time-spent.sql new file mode 100644 index 000000000..093eb4086 --- /dev/null +++ b/db/schema_0038-time-spent.sql @@ -0,0 +1,2 @@ +alter table admin_log + add column time_spent int not null default 0; |