Remove account type column
This commit is contained in:
5
db/migrate/20240203030754_remove_type_from_accounts.rb
Normal file
5
db/migrate/20240203030754_remove_type_from_accounts.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class RemoveTypeFromAccounts < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
remove_column :accounts, :type
|
||||
end
|
||||
end
|
||||
4
db/schema.rb
generated
4
db/schema.rb
generated
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2024_02_02_230325) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2024_02_03_030754) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
enable_extension "plpgsql"
|
||||
@@ -56,7 +56,6 @@ ActiveRecord::Schema[7.2].define(version: 2024_02_02_230325) do
|
||||
end
|
||||
|
||||
create_table "accounts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
t.string "type"
|
||||
t.string "subtype"
|
||||
t.uuid "family_id", null: false
|
||||
t.string "name"
|
||||
@@ -68,7 +67,6 @@ ActiveRecord::Schema[7.2].define(version: 2024_02_02_230325) do
|
||||
t.uuid "accountable_id"
|
||||
t.index ["accountable_type"], name: "index_accounts_on_accountable_type"
|
||||
t.index ["family_id"], name: "index_accounts_on_family_id"
|
||||
t.index ["type"], name: "index_accounts_on_type"
|
||||
end
|
||||
|
||||
create_table "families", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
|
||||
6
test/fixtures/accounts.yml
vendored
6
test/fixtures/accounts.yml
vendored
@@ -1,13 +1,11 @@
|
||||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
type:
|
||||
family: one
|
||||
name: MyString
|
||||
balance:
|
||||
balance:
|
||||
|
||||
two:
|
||||
type:
|
||||
family: two
|
||||
name: MyString
|
||||
balance:
|
||||
balance:
|
||||
|
||||
Reference in New Issue
Block a user