If I have a table User
.
At first, it has 2 columns phone
, address
Later I need to a an new column name
,
How could I add the new column and put the new column in first position.
I know how to add a new column
add_column :users, :name, :string
But not knowing how to change its order.
Because it will append to the last position by default.
I read a book 'head first SQL'
It told me , it's a better practice to put your primary key in the first position