diff options
author | Masaya Tojo <masaya@tojo.tokyo> | 2023-11-11 16:13:41 +0900 |
---|---|---|
committer | Masaya Tojo <masaya@tojo.tokyo> | 2023-11-11 16:13:41 +0900 |
commit | 9c8cbed6cdd725ed1153a260ab0844971b685fbf (patch) | |
tree | 9564f59e51d53764de04e6a685dabee1bf0c9149 /revert | |
parent | 46389b3d0d929d74048a5e2e0431641622f17e1a (diff) |
Change taken_at column type to timestamptz
Diffstat (limited to 'revert')
-rw-r--r-- | revert/photos.sql | 6 | ||||
-rw-r--r-- | revert/photos@v1.0.0-alpha1.sql | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/revert/photos.sql b/revert/photos.sql index 7fb3606..9fccf7e 100644 --- a/revert/photos.sql +++ b/revert/photos.sql @@ -1,9 +1,11 @@ --- Revert photos:photos from pg +-- Deploy photos:photos to pg +-- requires: schema BEGIN; SET search_path to photos; -DROP TABLE photos; +ALTER TABLE photos + ALTER COLUMN taken_at TYPE time USING (taken_at AT TIME ZONE 'Asia/Tokyo')::time; COMMIT; diff --git a/revert/photos@v1.0.0-alpha1.sql b/revert/photos@v1.0.0-alpha1.sql new file mode 100644 index 0000000..7fb3606 --- /dev/null +++ b/revert/photos@v1.0.0-alpha1.sql @@ -0,0 +1,9 @@ +-- Revert photos:photos from pg + +BEGIN; + +SET search_path to photos; + +DROP TABLE photos; + +COMMIT; |