diff --git a/db/migrate/20230202132107_install_audited.rb b/db/migrate/20230202132107_install_audited.rb index 0bb6da79c..7c9f1dd54 100644 --- a/db/migrate/20230202132107_install_audited.rb +++ b/db/migrate/20230202132107_install_audited.rb @@ -13,7 +13,7 @@ class InstallAudited < ActiveRecord::Migration[6.1] t.string :username t.string :action t.jsonb :audited_changes - t.integer :version, :integer, :default => 0 + t.integer :version, :default => 0 t.string :comment t.string :remote_address t.string :request_uuid diff --git a/db/migrate/20230328131926_drop_extra_audit_integer_column.rb b/db/migrate/20230328131926_drop_extra_audit_integer_column.rb new file mode 100644 index 000000000..58a7d91c4 --- /dev/null +++ b/db/migrate/20230328131926_drop_extra_audit_integer_column.rb @@ -0,0 +1,7 @@ +class DropExtraAuditIntegerColumn < ActiveRecord::Migration[6.1] + def change + # this column was added unintentionally for a time in a migration but not in schema.rb, so some + # installations will have it and some won't. + remove_column :audits, :integer, :integer, default: 0, if_exists: true + end +end diff --git a/db/schema.rb b/db/schema.rb index b12b2231a..4627e3ddc 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2023_03_27_081350) do +ActiveRecord::Schema.define(version: 2023_03_28_131926) do # These are extensions that must be enabled in order to support this database enable_extension "pg_stat_statements"