diff options
| author | 2017-02-13 21:51:10 +0000 | |
|---|---|---|
| committer | 2017-02-13 22:17:14 +0000 | |
| commit | ecb16565531b349acda366515ebb2f9fc1cc24a3 (patch) | |
| tree | 69630bcddc86b035e2285deee5aa74a32769ddb0 /lib | |
| parent | e763ec8c425f73eb96adc5265ae1258b697a3ea6 (diff) | |
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.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ASM/DB.pm | 2 | ||||
| -rw-r--r-- | lib/ASM/DB/Result/Alertlog.pm | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/ASM/DB.pm b/lib/ASM/DB.pm index 84f323b..cc9906c 100644 --- a/lib/ASM/DB.pm +++ b/lib/ASM/DB.pm @@ -1,5 +1,5 @@ use utf8; -package ASM::DB 2; +package ASM::DB 3; use strict; use warnings; diff --git a/lib/ASM/DB/Result/Alertlog.pm b/lib/ASM/DB/Result/Alertlog.pm index 8ce22ff..f7155df 100644 --- a/lib/ASM/DB/Result/Alertlog.pm +++ b/lib/ASM/DB/Result/Alertlog.pm @@ -23,8 +23,9 @@ __PACKAGE__->add_columns( level => { data_type => 'tinytext', is_nullable => 0 }, id => { data_type => 'tinytext', is_nullable => 0 }, reason => { data_type => 'text', is_nullable => 0 }, + sqlid => { data_type => 'bigint', is_auto_increment => 1, is_nullable => 0 }, ); -__PACKAGE__->set_primary_key('id'); +__PACKAGE__->set_primary_key('sqlid'); 1; |
