refactor(chalice): changed default scope state
This commit is contained in:
parent
3597523a04
commit
6f0deb57da
6 changed files with 8 additions and 4 deletions
|
|
@ -87,7 +87,7 @@ async def create_tenant(data: schemas.UserSignupSchema):
|
||||||
"spotRefreshToken": r.pop("spotRefreshToken"),
|
"spotRefreshToken": r.pop("spotRefreshToken"),
|
||||||
"spotRefreshTokenMaxAge": r.pop("spotRefreshTokenMaxAge"),
|
"spotRefreshTokenMaxAge": r.pop("spotRefreshTokenMaxAge"),
|
||||||
'data': {
|
'data': {
|
||||||
"scopeState": 0,
|
"scopeState": 2,
|
||||||
"user": r
|
"user": r
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ async def create_tenant(data: schemas.UserSignupSchema):
|
||||||
"spotRefreshTokenMaxAge": r.pop("spotRefreshTokenMaxAge"),
|
"spotRefreshTokenMaxAge": r.pop("spotRefreshTokenMaxAge"),
|
||||||
"tenantId": t["tenant_id"],
|
"tenantId": t["tenant_id"],
|
||||||
'data': {
|
'data': {
|
||||||
"scopeState": 0,
|
"scopeState": 2,
|
||||||
"user": r
|
"user": r
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ $fn_def$, :'next_version')
|
||||||
--
|
--
|
||||||
|
|
||||||
DROP SCHEMA IF EXISTS or_cache CASCADE;
|
DROP SCHEMA IF EXISTS or_cache CASCADE;
|
||||||
|
ALTER TABLE public.tenants
|
||||||
|
ALTER COLUMN scope_state SET DEFAULT 2;
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ CREATE TABLE public.tenants
|
||||||
t_users integer NOT NULL DEFAULT 1,
|
t_users integer NOT NULL DEFAULT 1,
|
||||||
t_integrations integer NOT NULL DEFAULT 0,
|
t_integrations integer NOT NULL DEFAULT 0,
|
||||||
last_telemetry bigint NOT NULL DEFAULT CAST(EXTRACT(epoch FROM date_trunc('day', now())) * 1000 AS BIGINT),
|
last_telemetry bigint NOT NULL DEFAULT CAST(EXTRACT(epoch FROM date_trunc('day', now())) * 1000 AS BIGINT),
|
||||||
scope_state smallint NOT NULL DEFAULT 0
|
scope_state smallint NOT NULL DEFAULT 2
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ $fn_def$, :'next_version')
|
||||||
--
|
--
|
||||||
|
|
||||||
DROP SCHEMA IF EXISTS or_cache CASCADE;
|
DROP SCHEMA IF EXISTS or_cache CASCADE;
|
||||||
|
ALTER TABLE public.tenants
|
||||||
|
ALTER COLUMN scope_state SET DEFAULT 2;
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ CREATE TABLE public.tenants
|
||||||
t_users integer NOT NULL DEFAULT 1,
|
t_users integer NOT NULL DEFAULT 1,
|
||||||
t_integrations integer NOT NULL DEFAULT 0,
|
t_integrations integer NOT NULL DEFAULT 0,
|
||||||
last_telemetry bigint NOT NULL DEFAULT CAST(EXTRACT(epoch FROM date_trunc('day', now())) * 1000 AS BIGINT),
|
last_telemetry bigint NOT NULL DEFAULT CAST(EXTRACT(epoch FROM date_trunc('day', now())) * 1000 AS BIGINT),
|
||||||
scope_state smallint NOT NULL DEFAULT 0,
|
scope_state smallint NOT NULL DEFAULT 2,
|
||||||
CONSTRAINT onerow_uni CHECK (tenant_id = 1)
|
CONSTRAINT onerow_uni CHECK (tenant_id = 1)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue