mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
15 lines
383 B
Ruby
15 lines
383 B
Ruby
|
|
class CreateNotifications < ActiveRecord::Migration[7.1]
|
||
|
|
def change
|
||
|
|
create_table :notifications do |t|
|
||
|
|
t.string :title, null: false
|
||
|
|
t.text :content, null: false
|
||
|
|
t.references :user, null: false, foreign_key: true
|
||
|
|
t.integer :kind, null: false, default: 0
|
||
|
|
t.datetime :read_at
|
||
|
|
|
||
|
|
t.timestamps
|
||
|
|
end
|
||
|
|
add_index :notifications, :kind
|
||
|
|
end
|
||
|
|
end
|