From 42dafd1db69ccdfef25a0060092043ff7f48ced5 Mon Sep 17 00:00:00 2001 From: Marlon Monroy Date: Tue, 14 Feb 2023 09:51:57 -0800 Subject: [PATCH 1/2] did small adjustments on the migration files --- ...rm_contact-to-platform_device-to-instrument_platform.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migrations/0005_user-to-platform_contact-to-platform_device-to-instrument_platform.sql b/migrations/0005_user-to-platform_contact-to-platform_device-to-instrument_platform.sql index cc1036fa..d3bc9927 100644 --- a/migrations/0005_user-to-platform_contact-to-platform_device-to-instrument_platform.sql +++ b/migrations/0005_user-to-platform_contact-to-platform_device-to-instrument_platform.sql @@ -40,10 +40,10 @@ ALTER TABLE platform DROP COLUMN IF EXISTS api_key, DROP COLUMN IF EXISTS authentication, ADD COLUMN activated_at TIMESTAMP WITH TIME ZONE DEFAULT NULL, -- for activating prod users - ADD COLUMN name TEXT NOT NULL, + ADD COLUMN name TEXT NOT NULL DEFAULT '', ADD COLUMN description TEXT DEFAULT '', - ADD COLUMN domains TEXT[] DEFAULT NULL, -- define which domains can make calls to API (web-to-API) - ADD COLUMN ip_addresses TEXT[] DEFAULT NULL; -- define which API ips can make calls (API-to-API) + ADD COLUMN domains TEXT[] DEFAULT '{}'::TEXT[], -- define which domains can make calls to API (web-to-API) + ADD COLUMN ip_addresses TEXT[] DEFAULT '{}'::TEXT[]; -- define which API ips can make calls (API-to-API) ------------------------------------------------------------------------- -- TRANSACTION ------------------------------------------------------------- From ed21aaf186f1b43cc20e09bdb99c49e5fd069ed3 Mon Sep 17 00:00:00 2001 From: Ocasta Date: Tue, 14 Feb 2023 12:15:24 -0600 Subject: [PATCH 2/2] make api description default empty string --- ...platform_member-role_member-to-role_member-invite_apikey.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/0006_platform-member_member-to-platform_member-role_member-to-role_member-invite_apikey.sql b/migrations/0006_platform-member_member-to-platform_member-role_member-to-role_member-invite_apikey.sql index 8cc24d81..e340d880 100644 --- a/migrations/0006_platform-member_member-to-platform_member-role_member-to-role_member-invite_apikey.sql +++ b/migrations/0006_platform-member_member-to-platform_member-role_member-to-role_member-invite_apikey.sql @@ -66,7 +66,7 @@ CREATE TABLE apikey ( deactivated_at TIMESTAMP WITH TIME ZONE DEFAULT NULL, type TEXT NOT NULL, -- [public,private] for now all public? data TEXT NOT NULL, -- the key itself - description TEXT DEFAULT NULL, + description TEXT DEFAULT '', created_by UUID REFERENCES platform_member (id), platform_id UUID REFERENCES platform (id) );