1 2 3 4 5 6 7 | begin;
alter table web_child add column strnum varchar(10);
update web_child set strnum = to_char(schoolstd,'999');
alter table web_child alter column strnum set not null;
alter table web_child drop column schoolstd;
alter table web_child rename column strnum to schoolstd;
commit;
|
More like this
- Simple solution for model schema evolution / database changelog by kahless 6 years ago
- PostgreSQL fulltext with language translations by diverman 2 years, 10 months ago
- Command to dump data as a python script by willhardy 5 years ago
- automating twitter by lawgon 3 years, 11 months ago
- Dynamic Models Revisited by Ben 5 years, 8 months ago
Comments