aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--db/downgrade_0055---0054.sql6
-rw-r--r--db/schema.sql1
-rw-r--r--db/schema_0055-add-default-to-reponsepriority.sql5
-rw-r--r--perllib/FixMyStreet/DB/Result/ResponsePriority.pm6
4 files changed, 16 insertions, 2 deletions
diff --git a/db/downgrade_0055---0054.sql b/db/downgrade_0055---0054.sql
new file mode 100644
index 000000000..a38d74ded
--- /dev/null
+++ b/db/downgrade_0055---0054.sql
@@ -0,0 +1,6 @@
+BEGIN;
+
+ALTER TABLE response_priorities DROP COLUMN is_default;
+
+COMMIT;
+
diff --git a/db/schema.sql b/db/schema.sql
index fedab2b9d..f428ff59d 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -144,6 +144,7 @@ CREATE TABLE response_priorities (
name text not null,
description text,
external_id text,
+ is_default boolean not null default 'f',
unique(body_id, name)
);
diff --git a/db/schema_0055-add-default-to-reponsepriority.sql b/db/schema_0055-add-default-to-reponsepriority.sql
new file mode 100644
index 000000000..0f8b72e13
--- /dev/null
+++ b/db/schema_0055-add-default-to-reponsepriority.sql
@@ -0,0 +1,5 @@
+BEGIN;
+
+ALTER TABLE response_priorities ADD is_default boolean not null default 'f';
+
+COMMIT;
diff --git a/perllib/FixMyStreet/DB/Result/ResponsePriority.pm b/perllib/FixMyStreet/DB/Result/ResponsePriority.pm
index 44635d174..df54cfa08 100644
--- a/perllib/FixMyStreet/DB/Result/ResponsePriority.pm
+++ b/perllib/FixMyStreet/DB/Result/ResponsePriority.pm
@@ -28,6 +28,8 @@ __PACKAGE__->add_columns(
{ data_type => "text", is_nullable => 1 },
"external_id",
{ data_type => "text", is_nullable => 1 },
+ "is_default",
+ { data_type => "boolean", default_value => \"false", is_nullable => 0 },
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->add_unique_constraint("response_priorities_body_id_name_key", ["body_id", "name"]);
@@ -51,8 +53,8 @@ __PACKAGE__->has_many(
);
-# Created by DBIx::Class::Schema::Loader v0.07035 @ 2016-12-14 17:12:09
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:glsO0fLK6fNvg4TmW1DMPg
+# Created by DBIx::Class::Schema::Loader v0.07035 @ 2017-09-12 09:32:53
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JBIHFnaLvXCAUjgwTSB3CQ
__PACKAGE__->many_to_many( contacts => 'contact_response_priorities', 'contact' );