From ecb16565531b349acda366515ebb2f9fc1cc24a3 Mon Sep 17 00:00:00 2001 From: Janik Kleinhoff Date: Mon, 13 Feb 2017 21:51:10 +0000 Subject: DB: fix major fuckup "id" in the alertlog table refers to the ID name of the alert rule that triggered, **not** to some sort of unique ID. This commit rewrites the database schema history used by DBIx::Class::DeploymentHandler as the previous schemata were utterly useless (and, in fact, seem to be undeployable). @Unit193, @Xenthys Clearly you managed to deploy a database somehow. If you used the legacy `DATABASE.SCHEMA` file and `bin/db_legacy`, you should be able to update via `bin/db_upgrade`; I've tested to verify this. (If you //haven't// run `db_legacy` yet, make sure to update to exactly de9f3deabe35, run `db_legacy`, then update to this commit and proceed with `db_upgrade`.) If you used the `db_deploy` script, may Cthulhu have mercy on your soul: I'm pretty sure that would not actually have worked. That said, it's my mistake, so if you require further assistance, feel free to poke me on freenode. --- sql/_source/deploy/2/001-auto.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'sql/_source/deploy/2') diff --git a/sql/_source/deploy/2/001-auto.yml b/sql/_source/deploy/2/001-auto.yml index f65e9ea..5a58b43 100644 --- a/sql/_source/deploy/2/001-auto.yml +++ b/sql/_source/deploy/2/001-auto.yml @@ -186,19 +186,7 @@ schema: options: [] order: 1 alertlog: - constraints: - - deferrable: 1 - expression: '' - fields: - - id - match_type: '' - name: '' - on_delete: '' - on_update: '' - options: [] - reference_fields: [] - reference_table: '' - type: PRIMARY KEY + constraints: [] fields: channel: data_type: text @@ -234,7 +222,7 @@ schema: data_type: tinytext default_value: ~ is_nullable: 0 - is_primary_key: 1 + is_primary_key: 0 is_unique: 0 name: id order: 8 -- cgit v1.2.3