Skip to content

Commit

Permalink
Remove column defaults for status_pins timestamp columns (mastodon#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mjankowski authored Apr 24, 2024
1 parent b128474 commit d9eee9b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

class RemoveDefaultsForStatusPinsTimestamps < ActiveRecord::Migration[7.1]
def change
change_column_default :status_pins, :created_at, from: -> { 'CURRENT_TIMESTAMP' }, to: nil
change_column_default :status_pins, :updated_at, from: -> { 'CURRENT_TIMESTAMP' }, to: nil
end
end
4 changes: 2 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1030,8 +1030,8 @@
create_table "status_pins", force: :cascade do |t|
t.bigint "account_id", null: false
t.bigint "status_id", null: false
t.datetime "created_at", precision: nil, default: -> { "now()" }, null: false
t.datetime "updated_at", precision: nil, default: -> { "now()" }, null: false
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["account_id", "status_id"], name: "index_status_pins_on_account_id_and_status_id", unique: true
t.index ["status_id"], name: "index_status_pins_on_status_id"
end
Expand Down

0 comments on commit d9eee9b

Please sign in to comment.