mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 23:42:04 +02:00
parent
90ed23f64d
commit
b6ecae6a35
41 changed files with 1239 additions and 61 deletions
9
db/migrate/20180824215326_create_actions.rb
Normal file
9
db/migrate/20180824215326_create_actions.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
class CreateActions < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :actions do |t|
|
||||
t.belongs_to :user, foreign_key: true
|
||||
t.string :operation
|
||||
t.datetime :created_at
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class ChangeActionsOperationToNotNull < ActiveRecord::Migration
|
||||
def change
|
||||
change_column_null :actions, :operation, false
|
||||
end
|
||||
end
|
5
db/migrate/20180825232819_add_contact_id_to_actions.rb
Normal file
5
db/migrate/20180825232819_add_contact_id_to_actions.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddContactIdToActions < ActiveRecord::Migration
|
||||
def change
|
||||
add_reference :actions, :contact, foreign_key: true
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddActionIdToNotifications < ActiveRecord::Migration
|
||||
def change
|
||||
add_reference :notifications, :action, foreign_key: true
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue