diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/schema.sql | 8 | ||||
-rw-r--r-- | db/schema_0029-add_deleted_flag_to_body.sql | 6 | ||||
-rw-r--r-- | db/schema_0030-drop-action-log-check-constraint.sql | 6 |
3 files changed, 15 insertions, 5 deletions
diff --git a/db/schema.sql b/db/schema.sql index f221825f2..6ddb7bae6 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -65,7 +65,8 @@ create table body ( comment_user_id int references users(id), suppress_alerts boolean not null default 'f', can_be_devolved boolean not null default 'f', - send_extended_statuses boolean not null default 'f' + send_extended_statuses boolean not null default 'f', + deleted boolean not null default 'f' ); create table body_areas ( @@ -448,9 +449,6 @@ create table admin_log ( or object_type = 'user' ), object_id integer not null, - action text not null check ( - action = 'edit' - or action = 'state_change' - or action = 'resend'), + action text not null, whenedited timestamp not null default ms_current_timestamp() ); diff --git a/db/schema_0029-add_deleted_flag_to_body.sql b/db/schema_0029-add_deleted_flag_to_body.sql new file mode 100644 index 000000000..3a8be7890 --- /dev/null +++ b/db/schema_0029-add_deleted_flag_to_body.sql @@ -0,0 +1,6 @@ +BEGIN; + +ALTER table body + ADD column deleted BOOL NOT NULL DEFAULT 'f'; + +COMMIT; diff --git a/db/schema_0030-drop-action-log-check-constraint.sql b/db/schema_0030-drop-action-log-check-constraint.sql new file mode 100644 index 000000000..dfc5387f3 --- /dev/null +++ b/db/schema_0030-drop-action-log-check-constraint.sql @@ -0,0 +1,6 @@ +BEGIN; + +ALTER TABLE admin_log + DROP CONSTRAINT admin_log_action_check; + +COMMIT; |