Dev DB Structure Updates
От | |
---|---|
Тема | Dev DB Structure Updates |
Дата | |
Msg-id | 20060511165519.75057.qmail@web33311.mail.mud.yahoo.com обсуждение исходный текст |
Ответы |
Re: Dev DB Structure Updates
Re: Dev DB Structure Updates |
Список | pgsql-novice |
hi all, i'm reading agile web dev with rails and the author discusses how he makes text sql snapshots of his databases. when a new column needs to be added, for example, he updates the text sql and reloads the file. in mysql, he puts a statement like... if table_example exists delete table_example that is close, but not the exact code. he is trying to delete the existing table (wrong structure) and replace it with the new structure. should i uncomment... -- DROP DATABASE "edb-bms-dev"; to get... DROP DATABASE "edb-bms-dev"; in order to get similar behavior?i tried using the if table_example exists dyntax in pgsql and it didn't work. when i was using a similar strategy, except at the table level, the output kicked out an error saying the table wasn't there. however, the update went as expected - i thought the error was strange and must've had something to do with me dropping the table. is this the best way to control db revisions and make updates? one facet of this plan that appeals to me is that i can control column order within the db. this is important when using rails b/c rails displays the columns in order when it generates its web pages, by default. i'd appreciate hearing what others do. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
В списке pgsql-novice по дате отправления: