mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
in the migration script add state to the Contact
This commit is contained in:
parent
736aff0fc8
commit
d2b5266887
3 changed files with 33 additions and 30 deletions
|
@ -3,6 +3,7 @@ module Legacy
|
|||
self.table_name = :contact
|
||||
belongs_to :object_registry, foreign_key: :id
|
||||
belongs_to :object, foreign_key: :id
|
||||
belongs_to :object_state, foreign_key: :id, primary_key: :object_id
|
||||
|
||||
has_one :object_state, -> { where('valid_to IS NULL') }, foreign_key: :object_id
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue