Skip to content

Commit

Permalink
Widen documents position (#6997)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom authored Jul 25, 2024
1 parent 4f862f9 commit f903736
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class ChangeDocumentsPositionToBiggerInt < ActiveRecord::Migration[7.0]
def change
return if Rails.env.production?

change_column :documents, :position, :integer, null: false, limit: 2, default: 0
end
end
4 changes: 2 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2024_07_10_082636) do
ActiveRecord::Schema[7.0].define(version: 2024_07_25_080340) do
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
Expand Down Expand Up @@ -152,7 +152,7 @@
t.string "blurb"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "position", limit: 1, default: 0, null: false
t.integer "position", limit: 2, default: 0, null: false
t.index ["section", "position"], name: "index_documents_on_section_and_position"
t.index ["slug"], name: "index_documents_on_slug"
t.index ["track_id", "position"], name: "index_documents_on_track_id_and_position"
Expand Down

0 comments on commit f903736

Please sign in to comment.