Skip to content

Commit

Permalink
chore: bump versions, cleaned up shard.override.yml, make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
naqvis committed Mar 16, 2023
1 parent 43e5bbd commit 58b0998
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .ameba.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Lint/NotNil:
Enabled: false
Style/QueryBoolMethods:
Enabled: false
4 changes: 0 additions & 4 deletions shard.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ dependencies:
CrystalEmail:
github: place-labs/CrystalEmail
branch: master

placeos-models:
github: placeos/models
branch: refactor/pg-migration
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:

placeos-models:
github: placeos/models
version: ">= 6.0"
version: ">= 9.0"

promise:
github: spider-gazelle/promise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ CREATE TABLE IF NOT EXISTS "zone"(
count INTEGER NOT NULL,
capacity INTEGER NOT NULL,
map_id TEXT,
timezone TEXT,
triggers TEXT[] NOT NULL,
images TEXT[] NOT NULL,
parent_id TEXT,
id TEXT NOT NULL PRIMARY KEY
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS "sys"(
name TEXT NOT NULL,
description TEXT NOT NULL,
features TEXT[] NOT NULL,
email JSONB,
email TEXT,
bookable BOOLEAN NOT NULL,
display_name TEXT,
code TEXT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS "user"(
updated_at TIMESTAMPTZ NOT NULL,
name TEXT NOT NULL,
nickname TEXT NOT NULL,
email JSONB NOT NULL,
email TEXT NOT NULL,
phone TEXT NOT NULL,
country TEXT NOT NULL,
image TEXT NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- +micrate Up
-- SQL in section 'Up' is executed when this migration is applied

ALTER TABLE "sys" ADD COLUMN public BOOLEAN NOT NULL DEFAULT false;

-- +micrate Down
-- SQL section 'Down' is executed when this migration is rolled back

ALTER TABLE "sys" DROP COLUMN public;
18 changes: 18 additions & 0 deletions spec/migration/db/migrations/20230314100503_alter_user_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-- +micrate Up
-- SQL in section 'Up' is executed when this migration is applied

alter table "user" alter COLUMN nickname drop NOT NULL;
alter table "user" alter COLUMN phone drop NOT NULL;
alter table "user" alter COLUMN country drop NOT NULL;
alter table "user" alter COLUMN image drop NOT NULL;
alter table "user" alter COLUMN ui_theme drop NOT NULL;
alter table "user" alter COLUMN misc drop NOT NULL;

-- +micrate Down
-- SQL section 'Down' is executed when this migration is rolled back
alter table "user" alter COLUMN nickname set NOT NULL;
alter table "user" alter COLUMN phone set NOT NULL;
alter table "user" alter COLUMN country set NOT NULL;
alter table "user" alter COLUMN image set NOT NULL;
alter table "user" alter COLUMN ui_theme set NOT NULL;
alter table "user" alter COLUMN misc set NOT NULL;

0 comments on commit 58b0998

Please sign in to comment.