~cytrogen/masto-fe

ref: 9bb2fb6b1484c90c5b2c6cc52ce148019e82a3e2 masto-fe/db/migrate/20210908220918_create_status_edits.rb -rw-r--r-- 501 bytes
9bb2fb6b — Claire Change importers to avoid a few inefficiencies (#26721) 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class CreateStatusEdits < ActiveRecord::Migration[6.1]
  def change
    create_table :status_edits do |t|
      t.belongs_to :status, null: false, foreign_key: { on_delete: :cascade }
      t.belongs_to :account, null: true, foreign_key: { on_delete: :nullify }
      t.text :text, null: false, default: ''
      t.text :spoiler_text, null: false, default: ''
      t.boolean :media_attachments_changed, null: false, default: false

      t.timestamps
    end
  end
end