Skip to content

Commit

Permalink
fix: Flyway DDL문 변경
Browse files Browse the repository at this point in the history
- 배포 실패 조정
- NULL 참조 수정
  • Loading branch information
JoosungKwon committed Aug 4, 2023
1 parent 2624754 commit 522552e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/resources/db/migration/V5__chage_SRID.sql
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
ALTER TABLE store
ADD location_new_srid POINT SRID 5179 NOT NULL;
ADD location_srid POINT SRID 5179 NULL;

UPDATE store
SET location_new_srid = ST_PointFromText(ST_AsText(location), 5179);
SET location_srid = ST_PointFromText(ST_AsText(location), 5179);

ALTER TABLE store
DROP location;

ALTER TABLE store
CHANGE location_new_srid location POINT SRID 5179 NOT NULL;
CHANGE location_srid location POINT SRID 5179 NOT NULL;


ALTER TABLE crew
ADD location_new_srid POINT SRID 5179 NOT NULL;
ADD location_srid POINT SRID 5179 NULL;

UPDATE crew
SET location_new_srid = ST_PointFromText(ST_AsText(location), 5179);
SET location_srid = ST_PointFromText(ST_AsText(location), 5179);

ALTER TABLE crew
DROP location;

ALTER TABLE crew
CHANGE location_new_srid location POINT SRID 5179 NOT NULL;
CHANGE location_srid location POINT SRID 5179 NOT NULL;

0 comments on commit 522552e

Please sign in to comment.