1
0

20200518083523_create_encrypted_messages.rb 566 B

123456789101112131415
  1. class CreateEncryptedMessages < ActiveRecord::Migration[5.2]
  2. def change
  3. create_table :encrypted_messages do |t|
  4. t.references :device, foreign_key: { on_delete: :cascade }
  5. t.references :from_account, foreign_key: { to_table: :accounts, on_delete: :cascade }
  6. t.string :from_device_id, default: '', null: false
  7. t.integer :type, default: 0, null: false
  8. t.text :body, default: '', null: false
  9. t.text :digest, default: '', null: false
  10. t.text :message_franking, default: '', null: false
  11. t.timestamps
  12. end
  13. end
  14. end