From 9103fbbddeb24c2b5dba10f75087cb9b2ca6ef22 Mon Sep 17 00:00:00 2001 From: Tejaswini Chile Date: Tue, 23 Nov 2021 16:04:01 +0530 Subject: [PATCH] chore: Update schema files (#3438) - removes the unintended table from schema files --- .../20211122112607_remove_invalid_migration.rb | 13 +++++++++++++ db/schema.rb | 10 +--------- 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 db/migrate/20211122112607_remove_invalid_migration.rb diff --git a/db/migrate/20211122112607_remove_invalid_migration.rb b/db/migrate/20211122112607_remove_invalid_migration.rb new file mode 100644 index 000000000..51a9701c8 --- /dev/null +++ b/db/migrate/20211122112607_remove_invalid_migration.rb @@ -0,0 +1,13 @@ +class RemoveInvalidMigration < ActiveRecord::Migration[6.1] + def change + return unless ActiveRecord::Base.connection.table_exists? 'actions' + + drop_table :actions do |t| + t.string :name + t.jsonb :execution_list + t.datetime :created_at + t.datetime :updated_at + t.index ['name'], name: 'index_actions_on_name' + end + end +end diff --git a/db/schema.rb b/db/schema.rb index a05c3e7da..b8ea425a8 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: 2021_11_22_061012) do +ActiveRecord::Schema.define(version: 2021_11_22_112607) do # These are extensions that must be enabled in order to support this database enable_extension "pg_stat_statements" @@ -63,14 +63,6 @@ ActiveRecord::Schema.define(version: 2021_11_22_061012) do t.index ["message_id", "message_checksum"], name: "index_action_mailbox_inbound_emails_uniqueness", unique: true end - create_table "actions", force: :cascade do |t| - t.string "name", null: false - t.jsonb "execution_list", default: {}, null: false - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false - t.index ["name"], name: "index_actions_on_name" - end - create_table "active_storage_attachments", force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false