mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
14 lines
383 B
Ruby
14 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
|