parent
3eda7beb59
commit
8e5e2a030a
@ -0,0 +1,7 @@
|
|||||||
|
class AddHousingToParent < ActiveRecord::Migration[8.0]
|
||||||
|
def change
|
||||||
|
add_reference :parents, :housing, foreign_key: true
|
||||||
|
Parent.update_all(housing_id: Housing.find_by(designation: 'Unknown').id)
|
||||||
|
change_column_null :parents, :housing_id, false
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
class CreateLanguages < ActiveRecord::Migration[8.0]
|
||||||
|
def change
|
||||||
|
create_table :languages do |t|
|
||||||
|
t.string :designation
|
||||||
|
t.string :slug
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe Language, type: :model do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
||||||
Loading…
Reference in new issue