sarting to generalize profiles
This commit is contained in:
17
db/migrate/20230115120517_create_profiles.rb
Normal file
17
db/migrate/20230115120517_create_profiles.rb
Normal file
@ -0,0 +1,17 @@
|
||||
class CreateProfiles < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :profiles do |t|
|
||||
t.string :name , null: false
|
||||
t.string :kind , null: false
|
||||
t.text :bio , null: false
|
||||
t.string :picture , null: false
|
||||
t.references :member, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
remove_column :members, :name, :string
|
||||
remove_column :members, :bio, :text
|
||||
remove_column :members, :picture, :string
|
||||
remove_column :members, :public, :boolean
|
||||
end
|
||||
end
|
@ -1,12 +0,0 @@
|
||||
class CreateTeachers < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :teachers do |t|
|
||||
t.string :name , null: false
|
||||
t.text :bio , null: false
|
||||
t.string :picture , null: false
|
||||
t.references :member, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user