Skip to content

Commit

Permalink
Hard way to change
Browse files Browse the repository at this point in the history
  • Loading branch information
sjib committed Feb 4, 2025
1 parent c0cf924 commit a10dee2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion datamodel/changelogs/0001/05_add_vl_pipe_section_pipe_dn.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
-- Change type of column -- see https://stackoverflow.com/questions/7162903/how-to-alter-a-columns-data-type-in-a-postgresql-table (version that allows to have already data in db)

ALTER TABLE tdh_od.pipe_section ALTER COLUMN nominal_diameter TYPE integer USING (NULLIF(nominal_diameter, '')::integer);
--ALTER TABLE tdh_od.pipe_section ALTER COLUMN nominal_diameter TYPE integer USING (NULLIF(nominal_diameter, '')::integer);

ALTER TABLE tdh_od.pipe_section
DROP COLUMN IF EXISTS nominal_diameter;

ALTER TABLE tdh_od.pipe_section ADD COLUMN nominal_diameter integer;
/*---------------------------------------------------------------------------------------*/
/* AJOUT DE LA TABLE DES DIAMETRES NOMINAUX DE CONDUITES () */
/*---------------------------------------------------------------------------------------*/
Expand Down

0 comments on commit a10dee2

Please sign in to comment.