From 8dbc07ea1feb19000fd8634c8b3333f653b51b6d Mon Sep 17 00:00:00 2001 From: cryptogopher Date: Wed, 17 Jan 2024 04:23:48 +0100 Subject: [PATCH] Remove awesome_nested_set related columns --- db/migrate/20230602185352_create_units.rb | 5 ----- db/schema.rb | 6 +----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/db/migrate/20230602185352_create_units.rb b/db/migrate/20230602185352_create_units.rb index 9d393b9..72dad5d 100644 --- a/db/migrate/20230602185352_create_units.rb +++ b/db/migrate/20230602185352_create_units.rb @@ -5,15 +5,10 @@ class CreateUnits < ActiveRecord::Migration[7.0] t.string :symbol t.string :name t.decimal :multiplier, precision: 30, scale: 15 - t.references :base - t.integer :lft, null: false - t.integer :rgt, null: false t.timestamps end add_index :units, [:user_id, :symbol], unique: true - add_index :units, :lft - add_index :units, :rgt end end diff --git a/db/schema.rb b/db/schema.rb index 0af7bcf..681582e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,20 +10,16 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_06_02_185352) do +ActiveRecord::Schema[7.1].define(version: 2023_06_02_185352) do create_table "units", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| t.bigint "user_id" t.string "symbol" t.string "name" t.decimal "multiplier", precision: 30, scale: 15 t.bigint "base_id" - t.integer "lft", null: false - t.integer "rgt", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["base_id"], name: "index_units_on_base_id" - t.index ["lft"], name: "index_units_on_lft" - t.index ["rgt"], name: "index_units_on_rgt" t.index ["user_id", "symbol"], name: "index_units_on_user_id_and_symbol", unique: true t.index ["user_id"], name: "index_units_on_user_id" end