You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Imagine you have the table create table my_table (id serial primary key); and these two migrations on separate branches:
altertable my_table add column column_1 int;
altertable my_table add column column_a text;
At first you might think these don't conflict, but actually they do, the end result is dependent on order:
createtablemy_table (
id serialprimary key,
column_1 int,
column_a text
);
versus:
createtablemy_table (
id serialprimary key,
column_a text,
column_1 int
);
Now if you try and represent this table value as a tuple - (1, 2, 'three')::my_table - then this will work against one DB but fail against the other. Order of columns is significant.
So it's best to ensure that your migrations are completely linear.
The text was updated successfully, but these errors were encountered:
Imagine you have the table
create table my_table (id serial primary key);
and these two migrations on separate branches:At first you might think these don't conflict, but actually they do, the end result is dependent on order:
versus:
Now if you try and represent this table value as a tuple -
(1, 2, 'three')::my_table
- then this will work against one DB but fail against the other. Order of columns is significant.So it's best to ensure that your migrations are completely linear.
The text was updated successfully, but these errors were encountered: