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
Other databases also have a smaller set of limitations that require a table rebuild (i.e. changing Identity on a column in SQL Server).
Reacted by Geir Sagberg, Brady Prigge, Halid Cisse, Henrique Clausing, julienshepherd, denisz1, Andrew Godfroy, Dan Kirkham, Mathias Fischler, Roman Starkov and 101 more
@danielmeza I would say we need to create every constraint in the "temp table". Because what you call "temp table" is not really temporary. It is in fact the new table that will be kept once renamed. So I'm not sure CREATE TABLE AS is the best way to create the new table.
@Damus765 I was missing the rename process, I thought that the data will be copy to the new table so the process goes like this. Create the temp table -> delete the old table -> create the new table with the new schema -> copy data back from the temp table -> delete the temp table.
But seriously, my six-year-old wasn't even born when I filed this issue. Crazy.
May all your rebuilding dreams come true! Check out our daily builds if you're eager to give it a try. Let me know if you find any bugs. (I still have a bit more testing to do myself.)
Reacted by Stephen J White, John Kelly, Jan Paolo Go, Matthew Hall, Tomáš Hübelbauer, Darrell, Halid Cisse, Mike Ciechan, Sasha Kotlyar, Rush and 1 more
Reacted by Stephen J White, John Kelly, Jan Paolo Go, Smit Patel, Tomáš Hübelbauer, Darrell, Kerry W. Lothrop, Halid Cisse, Luca Hostettler, Pablo Moleri and 6 more
Reacted by Hampus Gustavsson, Stephen J White, John Kelly, Jan Paolo Go, Tomáš Hübelbauer, timyhac, Darrell, Halid Cisse, José Luis Orihuela Conde, Sasha Kotlyar and 5 more
Reacted by Stephen J White, John Kelly, Jan Paolo Go, Matthew Hall, Tomáš Hübelbauer, Halid Cisse, Sasha Kotlyar, Rush, Massimo Del Zotto, DarkIrata and 2 more
Reacted by Hampus Gustavsson, Stephen J White, Christopher-Marcel Esser, John Kelly, Jan Paolo Go, Matthew Hall, Tomáš Hübelbauer, Daniel Meza, Halid Cisse, Sasha Kotlyar and 2 more
Activity
ErikEJ commentedon Jun 18, 2014
Yes, great RDBMS
bricelam commentedon Jun 18, 2015
Re-opening. I've "regressed" this. (not sure if it ever actually worked since there weren't any tests)
134 remaining items
Damus765 commentedon Apr 30, 2020
@danielmeza I would say we need to create every constraint in the "temp table". Because what you call "temp table" is not really temporary. It is in fact the new table that will be kept once renamed. So I'm not sure CREATE TABLE AS is the best way to create the new table.
danielmeza commentedon Apr 30, 2020
@Damus765 I was missing the rename process, I thought that the data will be copy to the new table so the process goes like this. Create the temp table -> delete the old table -> create the new table with the new schema -> copy data back from the temp table -> delete the temp table.
Damus765 commentedon Apr 30, 2020
@danielmeza According to the SQLite documentation, the recommended steps are as follows:
Only one data copy is required and you don't need a temp table.
bricelam commentedon Apr 30, 2020
@danielmeza Our strategy for using migrations with existing databases is tracked by #2167
bricelam commentedon May 29, 2020
More related issues for SQL Server: #12586, #16758, #18965 & #20943
bricelam commentedon Jul 16, 2020
But seriously, my six-year-old wasn't even born when I filed this issue. Crazy.
May all your rebuilding dreams come true! Check out our daily builds if you're eager to give it a try. Let me know if you find any bugs. (I still have a bit more testing to do myself.)