--Module: poll -- hopp-poll-update-v0_7_2-v0_7_3.sql Copyright (C) 2002 Sandino Araico Sánchez /* --LICENSE IN US ENGLISH----------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42-sandino-3): * Sandino Araico Sánchez wrote this file. * As long as you retain this notice you can do whatever you want with this * software. If we meet some day, and you think this stuff is worth it, you can * buy me a beer in return. * Sandino Araico Sánchez * --END LICENSE--------------------------------------------------------------- * --LICENCIA EN ESPAÑOL MEXICANO---------------------------------------------- * "LA LICENCIA BEER-WARE" (traducción al español de la revisión 42-sandino-3): * Sandino Araico Sánchez escribió éste archivo. * Siempre y cuando usted retenga éste aviso (en español y en inglés) usted * puede hacer cualquier cosa con éste software. Si algún día nos encontramos y * usted piensa que éste software vale la pena, usted puede invitarme una * cerveza en recompensa. * Sandino Araico Sánchez * --FIN DE LICENCIA----------------------------------------------------------- */ -- Changelog: -- 2002-03-15 Sandino Araico Sánchez - poll tables update sql script create table h_poll_new ( pll_key int2 constraint pk_pll_key_1 primary key, pll_name varchar(500) constraint nn_pll_name_1 not null, pll_type char constraint nn_pll_type_1 not null, pll_active char constraint nn_pll_active_1 not null ); insert into h_poll_new select * from h_poll; alter table h_poll rename to h_poll_old; alter table h_poll_new rename to h_poll; drop table h_poll_old; create index i_pll_active on h_poll(pll_active); grant all on s_poll to nobody; grant all on h_poll to nobody; create table h_poll_det_new( pll_det_key int2 constraint pk_pll_det_key_2 primary key, pll_det_poll int2 constraint nn_pll_det_poll_2 not null, pll_det_option varchar(500) constraint nn_pll_det_option_2 not null, pll_det_order int2 ); insert into h_poll_det_new select * from h_poll_det; alter table h_poll_det RENAME TO h_poll_det_old; alter table h_poll_det_new RENAME TO h_poll_det; drop table h_poll_det_old; alter table h_poll_det add constraint fk_pll_det_poll foreign key (pll_det_poll) references h_poll(pll_key); create index i_pll_det_poll on h_poll_det(pll_det_poll); create index i_pll_det_order on h_poll_det(pll_det_order); grant all on s_poll_det to nobody; grant all on h_poll_det to nobody;