Skip to content

armgit / maybe

Public Imported from GitHub
0

The personal finance app for everyone

Remove account type column

Rob Zolkose7d7c70b2f74
diff --git a/db/migrate/20240203030754_remove_type_from_accounts.rb b/db/migrate/20240203030754_remove_type_from_accounts.rb
new file mode 100644
index 00000000..27348f9f
--- /dev/null
+++ b/db/migrate/20240203030754_remove_type_from_accounts.rb
@@ -0,0 +1,5 @@
+class RemoveTypeFromAccounts < ActiveRecord::Migration[7.2]
+ def change
+ remove_column :accounts, :type
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 7cdbc9bf..ce7d581a 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[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|
diff --git a/test/fixtures/accounts.yml b/test/fixtures/accounts.yml
index aa863be0..2ee283d9 100644
--- a/test/fixtures/accounts.yml
+++ b/test/fixtures/accounts.yml
@@ -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: