Closed aniketpatidar closed 1 month ago
Update title to
Fixes #36 : Add ...
Also, once your previous PR gets merged, you can update this branch and assign it back to me.
I will make the changes you suggested!
@aniketpatidar You can update this now.
@aniketpatidar Can you inform me the process you followed for writing this code?
Firstly generated migration rails generate model Specialization name:string:uniq
Then added null false
class CreateSpecializations < ActiveRecord::Migration[6.1]
def change
create_table :specializations do |t|
t.string :name, null: false
t.timestamps
end
add_index :specializations, :name, unique: true
end
end
Then run rails db:migrate
Resolves #36
Description
This pull request introduces creating the
specializations
table in the database. Table includes the following attributes: Specializations table:name
(string, unique, not null)Type of Change
How to test this PR?
Steps to test the migrations:
rails db:migrate
to apply the migration.specializations
table is created in the database with thename
columns, timestamps.