-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restyle [FEATURE] 震度データベースによる地震履歴 (#751)
- Loading branch information
1 parent
9bbe4cf
commit cc78a07
Showing
3 changed files
with
7 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
supabase/migrations/20240802153149_add_earthquake_early_regions.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
CREATE TABLE earthquake_early_regions ( | ||
id TEXT NOT NULL REFERENCES earthquake_early (id), | ||
region_id TEXT NOT NULL CHECK (region_id ~ '^[0-9]{2}$'), | ||
max_intensity jma_intensity NOT NULL, | ||
PRIMARY KEY (id, region_id) | ||
id text NOT NULL REFERENCES earthquake_early (id), | ||
region_id text NOT NULL CHECK (region_id ~ '^[0-9]{2}$'), | ||
max_intensity jma_intensity NOT NULL, | ||
PRIMARY KEY (id, region_id) | ||
); | ||
|
||
CREATE INDEX earthquake_early_regions_max_intensity_region_idx ON earthquake_early_regions (max_intensity, region_id); | ||
|
||
ALTER TABLE earthquake_early_regions ENABLE ROW LEVEL SECURITY; | ||
|
||
CREATE POLICY select_earthquake_early_regions ON earthquake_early_regions FOR | ||
SELECT | ||
USING (true); | ||
CREATE POLICY select_earthquake_early_regions ON earthquake_early_regions | ||
FOR SELECT | ||
USING (TRUE); |