create-smoodly-app 0.0.47 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/astro-blank/package.json +1 -1
- package/templates/astro-blank/supabase/migrations/20261009120000_smoodly_v11.sql +49 -0
- package/templates/astro-blank/supabase/migrations/{20261008120100_smoodly_views.sql → 20261009120100_smoodly_views.sql} +1 -1
- package/templates/astro-blank-intl/package.json +1 -1
- package/templates/astro-blank-intl/supabase/migrations/20261009120000_smoodly_v11.sql +49 -0
- package/templates/astro-blank-intl/supabase/migrations/{20261008120100_smoodly_views.sql → 20261009120100_smoodly_views.sql} +1 -1
- package/templates/astro-lorem/package.json +1 -1
- package/templates/astro-lorem/supabase/migrations/20261009120000_smoodly_v11.sql +49 -0
- package/templates/{lorem/supabase/migrations/20261008120100_smoodly_views.sql → astro-lorem/supabase/migrations/20261009120100_smoodly_views.sql} +1 -1
- package/templates/astro-lorem-intl/package.json +1 -1
- package/templates/astro-lorem-intl/supabase/migrations/20261009120000_smoodly_v11.sql +49 -0
- package/templates/{lorem-intl/supabase/migrations/20261008120100_smoodly_views.sql → astro-lorem-intl/supabase/migrations/20261009120100_smoodly_views.sql} +1 -1
- package/templates/blank/package.json +1 -1
- package/templates/blank/supabase/migrations/20261009120000_smoodly_v11.sql +49 -0
- package/templates/blank/supabase/migrations/{20261008120100_smoodly_views.sql → 20261009120100_smoodly_views.sql} +1 -1
- package/templates/blank-intl/package.json +1 -1
- package/templates/blank-intl/supabase/migrations/20261009120000_smoodly_v11.sql +49 -0
- package/templates/blank-intl/supabase/migrations/{20261008120100_smoodly_views.sql → 20261009120100_smoodly_views.sql} +1 -1
- package/templates/lorem/package.json +1 -1
- package/templates/lorem/supabase/migrations/20261009120000_smoodly_v11.sql +49 -0
- package/templates/{astro-lorem/supabase/migrations/20261008120100_smoodly_views.sql → lorem/supabase/migrations/20261009120100_smoodly_views.sql} +1 -1
- package/templates/lorem-intl/package.json +1 -1
- package/templates/lorem-intl/supabase/migrations/20261009120000_smoodly_v11.sql +49 -0
- package/templates/{astro-lorem-intl/supabase/migrations/20261008120100_smoodly_views.sql → lorem-intl/supabase/migrations/20261009120100_smoodly_views.sql} +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
-- Smoodly core schema, version 11 (DESIGN §3, static mode, decided 2026-10-09).
|
|
2
|
+
-- Shipped in the smoodly package; `npx smoodly migrate` copies it into supabase/migrations/.
|
|
3
|
+
-- Never edit a published file: the next change is the next file.
|
|
4
|
+
-- The delta over version 10: space_deploys, one row per space holding the last
|
|
5
|
+
-- Deploy press (static mode's button), so a serverless function can tell a
|
|
6
|
+
-- build in flight from one that landed. Additive: no function changes.
|
|
7
|
+
|
|
8
|
+
set client_min_messages = warning;
|
|
9
|
+
|
|
10
|
+
-- The last Deploy press of a space (spec 2026-10-09 static mode §7): who pressed and when; the admin
|
|
11
|
+
-- compares it with the build marker the live site serves to show building, landed or not landed.
|
|
12
|
+
create table if not exists "space_deploys" (
|
|
13
|
+
"space_id" uuid primary key default '00000000-0000-0000-0000-000000000000',
|
|
14
|
+
-- Null until the first press: a removal may make the row first.
|
|
15
|
+
"requested_at" timestamptz,
|
|
16
|
+
"requested_by" text,
|
|
17
|
+
-- When a delivery row last went (an unpublish, a delete): a change the count of newer rows cannot see.
|
|
18
|
+
"removed_at" timestamptz
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
alter table "space_deploys" enable row level security;
|
|
22
|
+
|
|
23
|
+
-- Stamped with the caller's space on insert, as every content table.
|
|
24
|
+
drop trigger if exists "smoodly_a_set_space" on "space_deploys";
|
|
25
|
+
create trigger "smoodly_a_set_space" before insert on "space_deploys"
|
|
26
|
+
for each row execute function "smoodly_set_space"();
|
|
27
|
+
|
|
28
|
+
-- A write key reads and writes its own space's row; no other key reads (spec 2026-09-29 content API contract §8).
|
|
29
|
+
drop policy if exists "smoodly_write" on "space_deploys";
|
|
30
|
+
|
|
31
|
+
drop policy if exists "smoodly_insert" on "space_deploys";
|
|
32
|
+
create policy "smoodly_insert" on "space_deploys" for insert
|
|
33
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
34
|
+
|
|
35
|
+
drop policy if exists "smoodly_update" on "space_deploys";
|
|
36
|
+
create policy "smoodly_update" on "space_deploys" for update
|
|
37
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write')
|
|
38
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
39
|
+
|
|
40
|
+
drop policy if exists "smoodly_delete" on "space_deploys";
|
|
41
|
+
create policy "smoodly_delete" on "space_deploys" for delete
|
|
42
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
43
|
+
|
|
44
|
+
drop policy if exists "smoodly_read" on "space_deploys";
|
|
45
|
+
create policy "smoodly_read" on "space_deploys" for select
|
|
46
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
47
|
+
|
|
48
|
+
insert into "smoodly_meta" ("key", "value") values ('schema_version', '11')
|
|
49
|
+
on conflict ("key") do update set "value" = excluded."value";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
-- Smoodly: read views for this app's collections, written by `npx smoodly migrate`
|
|
2
|
-
-- (2026-10-
|
|
2
|
+
-- (2026-10-09T12:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
|
|
3
3
|
-- Never edit a written file: change the collection and run migrate again.
|
|
4
4
|
|
|
5
5
|
-- smoodly:collection posts sha256:38ba2918f83ab367
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
-- Smoodly core schema, version 11 (DESIGN §3, static mode, decided 2026-10-09).
|
|
2
|
+
-- Shipped in the smoodly package; `npx smoodly migrate` copies it into supabase/migrations/.
|
|
3
|
+
-- Never edit a published file: the next change is the next file.
|
|
4
|
+
-- The delta over version 10: space_deploys, one row per space holding the last
|
|
5
|
+
-- Deploy press (static mode's button), so a serverless function can tell a
|
|
6
|
+
-- build in flight from one that landed. Additive: no function changes.
|
|
7
|
+
|
|
8
|
+
set client_min_messages = warning;
|
|
9
|
+
|
|
10
|
+
-- The last Deploy press of a space (spec 2026-10-09 static mode §7): who pressed and when; the admin
|
|
11
|
+
-- compares it with the build marker the live site serves to show building, landed or not landed.
|
|
12
|
+
create table if not exists "space_deploys" (
|
|
13
|
+
"space_id" uuid primary key default '00000000-0000-0000-0000-000000000000',
|
|
14
|
+
-- Null until the first press: a removal may make the row first.
|
|
15
|
+
"requested_at" timestamptz,
|
|
16
|
+
"requested_by" text,
|
|
17
|
+
-- When a delivery row last went (an unpublish, a delete): a change the count of newer rows cannot see.
|
|
18
|
+
"removed_at" timestamptz
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
alter table "space_deploys" enable row level security;
|
|
22
|
+
|
|
23
|
+
-- Stamped with the caller's space on insert, as every content table.
|
|
24
|
+
drop trigger if exists "smoodly_a_set_space" on "space_deploys";
|
|
25
|
+
create trigger "smoodly_a_set_space" before insert on "space_deploys"
|
|
26
|
+
for each row execute function "smoodly_set_space"();
|
|
27
|
+
|
|
28
|
+
-- A write key reads and writes its own space's row; no other key reads (spec 2026-09-29 content API contract §8).
|
|
29
|
+
drop policy if exists "smoodly_write" on "space_deploys";
|
|
30
|
+
|
|
31
|
+
drop policy if exists "smoodly_insert" on "space_deploys";
|
|
32
|
+
create policy "smoodly_insert" on "space_deploys" for insert
|
|
33
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
34
|
+
|
|
35
|
+
drop policy if exists "smoodly_update" on "space_deploys";
|
|
36
|
+
create policy "smoodly_update" on "space_deploys" for update
|
|
37
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write')
|
|
38
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
39
|
+
|
|
40
|
+
drop policy if exists "smoodly_delete" on "space_deploys";
|
|
41
|
+
create policy "smoodly_delete" on "space_deploys" for delete
|
|
42
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
43
|
+
|
|
44
|
+
drop policy if exists "smoodly_read" on "space_deploys";
|
|
45
|
+
create policy "smoodly_read" on "space_deploys" for select
|
|
46
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
47
|
+
|
|
48
|
+
insert into "smoodly_meta" ("key", "value") values ('schema_version', '11')
|
|
49
|
+
on conflict ("key") do update set "value" = excluded."value";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
-- Smoodly: read views for this app's collections, written by `npx smoodly migrate`
|
|
2
|
-
-- (2026-10-
|
|
2
|
+
-- (2026-10-09T12:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
|
|
3
3
|
-- Never edit a written file: change the collection and run migrate again.
|
|
4
4
|
|
|
5
5
|
-- smoodly:collection posts sha256:38ba2918f83ab367
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
-- Smoodly core schema, version 11 (DESIGN §3, static mode, decided 2026-10-09).
|
|
2
|
+
-- Shipped in the smoodly package; `npx smoodly migrate` copies it into supabase/migrations/.
|
|
3
|
+
-- Never edit a published file: the next change is the next file.
|
|
4
|
+
-- The delta over version 10: space_deploys, one row per space holding the last
|
|
5
|
+
-- Deploy press (static mode's button), so a serverless function can tell a
|
|
6
|
+
-- build in flight from one that landed. Additive: no function changes.
|
|
7
|
+
|
|
8
|
+
set client_min_messages = warning;
|
|
9
|
+
|
|
10
|
+
-- The last Deploy press of a space (spec 2026-10-09 static mode §7): who pressed and when; the admin
|
|
11
|
+
-- compares it with the build marker the live site serves to show building, landed or not landed.
|
|
12
|
+
create table if not exists "space_deploys" (
|
|
13
|
+
"space_id" uuid primary key default '00000000-0000-0000-0000-000000000000',
|
|
14
|
+
-- Null until the first press: a removal may make the row first.
|
|
15
|
+
"requested_at" timestamptz,
|
|
16
|
+
"requested_by" text,
|
|
17
|
+
-- When a delivery row last went (an unpublish, a delete): a change the count of newer rows cannot see.
|
|
18
|
+
"removed_at" timestamptz
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
alter table "space_deploys" enable row level security;
|
|
22
|
+
|
|
23
|
+
-- Stamped with the caller's space on insert, as every content table.
|
|
24
|
+
drop trigger if exists "smoodly_a_set_space" on "space_deploys";
|
|
25
|
+
create trigger "smoodly_a_set_space" before insert on "space_deploys"
|
|
26
|
+
for each row execute function "smoodly_set_space"();
|
|
27
|
+
|
|
28
|
+
-- A write key reads and writes its own space's row; no other key reads (spec 2026-09-29 content API contract §8).
|
|
29
|
+
drop policy if exists "smoodly_write" on "space_deploys";
|
|
30
|
+
|
|
31
|
+
drop policy if exists "smoodly_insert" on "space_deploys";
|
|
32
|
+
create policy "smoodly_insert" on "space_deploys" for insert
|
|
33
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
34
|
+
|
|
35
|
+
drop policy if exists "smoodly_update" on "space_deploys";
|
|
36
|
+
create policy "smoodly_update" on "space_deploys" for update
|
|
37
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write')
|
|
38
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
39
|
+
|
|
40
|
+
drop policy if exists "smoodly_delete" on "space_deploys";
|
|
41
|
+
create policy "smoodly_delete" on "space_deploys" for delete
|
|
42
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
43
|
+
|
|
44
|
+
drop policy if exists "smoodly_read" on "space_deploys";
|
|
45
|
+
create policy "smoodly_read" on "space_deploys" for select
|
|
46
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
47
|
+
|
|
48
|
+
insert into "smoodly_meta" ("key", "value") values ('schema_version', '11')
|
|
49
|
+
on conflict ("key") do update set "value" = excluded."value";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
-- Smoodly: read views for this app's collections, written by `npx smoodly migrate`
|
|
2
|
-
-- (2026-10-
|
|
2
|
+
-- (2026-10-09T12:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
|
|
3
3
|
-- Never edit a written file: change the collection and run migrate again.
|
|
4
4
|
|
|
5
5
|
-- smoodly:collection people sha256:929798ebb4fa2bb6
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
-- Smoodly core schema, version 11 (DESIGN §3, static mode, decided 2026-10-09).
|
|
2
|
+
-- Shipped in the smoodly package; `npx smoodly migrate` copies it into supabase/migrations/.
|
|
3
|
+
-- Never edit a published file: the next change is the next file.
|
|
4
|
+
-- The delta over version 10: space_deploys, one row per space holding the last
|
|
5
|
+
-- Deploy press (static mode's button), so a serverless function can tell a
|
|
6
|
+
-- build in flight from one that landed. Additive: no function changes.
|
|
7
|
+
|
|
8
|
+
set client_min_messages = warning;
|
|
9
|
+
|
|
10
|
+
-- The last Deploy press of a space (spec 2026-10-09 static mode §7): who pressed and when; the admin
|
|
11
|
+
-- compares it with the build marker the live site serves to show building, landed or not landed.
|
|
12
|
+
create table if not exists "space_deploys" (
|
|
13
|
+
"space_id" uuid primary key default '00000000-0000-0000-0000-000000000000',
|
|
14
|
+
-- Null until the first press: a removal may make the row first.
|
|
15
|
+
"requested_at" timestamptz,
|
|
16
|
+
"requested_by" text,
|
|
17
|
+
-- When a delivery row last went (an unpublish, a delete): a change the count of newer rows cannot see.
|
|
18
|
+
"removed_at" timestamptz
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
alter table "space_deploys" enable row level security;
|
|
22
|
+
|
|
23
|
+
-- Stamped with the caller's space on insert, as every content table.
|
|
24
|
+
drop trigger if exists "smoodly_a_set_space" on "space_deploys";
|
|
25
|
+
create trigger "smoodly_a_set_space" before insert on "space_deploys"
|
|
26
|
+
for each row execute function "smoodly_set_space"();
|
|
27
|
+
|
|
28
|
+
-- A write key reads and writes its own space's row; no other key reads (spec 2026-09-29 content API contract §8).
|
|
29
|
+
drop policy if exists "smoodly_write" on "space_deploys";
|
|
30
|
+
|
|
31
|
+
drop policy if exists "smoodly_insert" on "space_deploys";
|
|
32
|
+
create policy "smoodly_insert" on "space_deploys" for insert
|
|
33
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
34
|
+
|
|
35
|
+
drop policy if exists "smoodly_update" on "space_deploys";
|
|
36
|
+
create policy "smoodly_update" on "space_deploys" for update
|
|
37
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write')
|
|
38
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
39
|
+
|
|
40
|
+
drop policy if exists "smoodly_delete" on "space_deploys";
|
|
41
|
+
create policy "smoodly_delete" on "space_deploys" for delete
|
|
42
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
43
|
+
|
|
44
|
+
drop policy if exists "smoodly_read" on "space_deploys";
|
|
45
|
+
create policy "smoodly_read" on "space_deploys" for select
|
|
46
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
47
|
+
|
|
48
|
+
insert into "smoodly_meta" ("key", "value") values ('schema_version', '11')
|
|
49
|
+
on conflict ("key") do update set "value" = excluded."value";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
-- Smoodly: read views for this app's collections, written by `npx smoodly migrate`
|
|
2
|
-
-- (2026-10-
|
|
2
|
+
-- (2026-10-09T12:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
|
|
3
3
|
-- Never edit a written file: change the collection and run migrate again.
|
|
4
4
|
|
|
5
5
|
-- smoodly:collection people sha256:929798ebb4fa2bb6
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
-- Smoodly core schema, version 11 (DESIGN §3, static mode, decided 2026-10-09).
|
|
2
|
+
-- Shipped in the smoodly package; `npx smoodly migrate` copies it into supabase/migrations/.
|
|
3
|
+
-- Never edit a published file: the next change is the next file.
|
|
4
|
+
-- The delta over version 10: space_deploys, one row per space holding the last
|
|
5
|
+
-- Deploy press (static mode's button), so a serverless function can tell a
|
|
6
|
+
-- build in flight from one that landed. Additive: no function changes.
|
|
7
|
+
|
|
8
|
+
set client_min_messages = warning;
|
|
9
|
+
|
|
10
|
+
-- The last Deploy press of a space (spec 2026-10-09 static mode §7): who pressed and when; the admin
|
|
11
|
+
-- compares it with the build marker the live site serves to show building, landed or not landed.
|
|
12
|
+
create table if not exists "space_deploys" (
|
|
13
|
+
"space_id" uuid primary key default '00000000-0000-0000-0000-000000000000',
|
|
14
|
+
-- Null until the first press: a removal may make the row first.
|
|
15
|
+
"requested_at" timestamptz,
|
|
16
|
+
"requested_by" text,
|
|
17
|
+
-- When a delivery row last went (an unpublish, a delete): a change the count of newer rows cannot see.
|
|
18
|
+
"removed_at" timestamptz
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
alter table "space_deploys" enable row level security;
|
|
22
|
+
|
|
23
|
+
-- Stamped with the caller's space on insert, as every content table.
|
|
24
|
+
drop trigger if exists "smoodly_a_set_space" on "space_deploys";
|
|
25
|
+
create trigger "smoodly_a_set_space" before insert on "space_deploys"
|
|
26
|
+
for each row execute function "smoodly_set_space"();
|
|
27
|
+
|
|
28
|
+
-- A write key reads and writes its own space's row; no other key reads (spec 2026-09-29 content API contract §8).
|
|
29
|
+
drop policy if exists "smoodly_write" on "space_deploys";
|
|
30
|
+
|
|
31
|
+
drop policy if exists "smoodly_insert" on "space_deploys";
|
|
32
|
+
create policy "smoodly_insert" on "space_deploys" for insert
|
|
33
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
34
|
+
|
|
35
|
+
drop policy if exists "smoodly_update" on "space_deploys";
|
|
36
|
+
create policy "smoodly_update" on "space_deploys" for update
|
|
37
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write')
|
|
38
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
39
|
+
|
|
40
|
+
drop policy if exists "smoodly_delete" on "space_deploys";
|
|
41
|
+
create policy "smoodly_delete" on "space_deploys" for delete
|
|
42
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
43
|
+
|
|
44
|
+
drop policy if exists "smoodly_read" on "space_deploys";
|
|
45
|
+
create policy "smoodly_read" on "space_deploys" for select
|
|
46
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
47
|
+
|
|
48
|
+
insert into "smoodly_meta" ("key", "value") values ('schema_version', '11')
|
|
49
|
+
on conflict ("key") do update set "value" = excluded."value";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
-- Smoodly: read views for this app's collections, written by `npx smoodly migrate`
|
|
2
|
-
-- (2026-10-
|
|
2
|
+
-- (2026-10-09T12:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
|
|
3
3
|
-- Never edit a written file: change the collection and run migrate again.
|
|
4
4
|
|
|
5
5
|
-- smoodly:collection posts sha256:38ba2918f83ab367
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
-- Smoodly core schema, version 11 (DESIGN §3, static mode, decided 2026-10-09).
|
|
2
|
+
-- Shipped in the smoodly package; `npx smoodly migrate` copies it into supabase/migrations/.
|
|
3
|
+
-- Never edit a published file: the next change is the next file.
|
|
4
|
+
-- The delta over version 10: space_deploys, one row per space holding the last
|
|
5
|
+
-- Deploy press (static mode's button), so a serverless function can tell a
|
|
6
|
+
-- build in flight from one that landed. Additive: no function changes.
|
|
7
|
+
|
|
8
|
+
set client_min_messages = warning;
|
|
9
|
+
|
|
10
|
+
-- The last Deploy press of a space (spec 2026-10-09 static mode §7): who pressed and when; the admin
|
|
11
|
+
-- compares it with the build marker the live site serves to show building, landed or not landed.
|
|
12
|
+
create table if not exists "space_deploys" (
|
|
13
|
+
"space_id" uuid primary key default '00000000-0000-0000-0000-000000000000',
|
|
14
|
+
-- Null until the first press: a removal may make the row first.
|
|
15
|
+
"requested_at" timestamptz,
|
|
16
|
+
"requested_by" text,
|
|
17
|
+
-- When a delivery row last went (an unpublish, a delete): a change the count of newer rows cannot see.
|
|
18
|
+
"removed_at" timestamptz
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
alter table "space_deploys" enable row level security;
|
|
22
|
+
|
|
23
|
+
-- Stamped with the caller's space on insert, as every content table.
|
|
24
|
+
drop trigger if exists "smoodly_a_set_space" on "space_deploys";
|
|
25
|
+
create trigger "smoodly_a_set_space" before insert on "space_deploys"
|
|
26
|
+
for each row execute function "smoodly_set_space"();
|
|
27
|
+
|
|
28
|
+
-- A write key reads and writes its own space's row; no other key reads (spec 2026-09-29 content API contract §8).
|
|
29
|
+
drop policy if exists "smoodly_write" on "space_deploys";
|
|
30
|
+
|
|
31
|
+
drop policy if exists "smoodly_insert" on "space_deploys";
|
|
32
|
+
create policy "smoodly_insert" on "space_deploys" for insert
|
|
33
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
34
|
+
|
|
35
|
+
drop policy if exists "smoodly_update" on "space_deploys";
|
|
36
|
+
create policy "smoodly_update" on "space_deploys" for update
|
|
37
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write')
|
|
38
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
39
|
+
|
|
40
|
+
drop policy if exists "smoodly_delete" on "space_deploys";
|
|
41
|
+
create policy "smoodly_delete" on "space_deploys" for delete
|
|
42
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
43
|
+
|
|
44
|
+
drop policy if exists "smoodly_read" on "space_deploys";
|
|
45
|
+
create policy "smoodly_read" on "space_deploys" for select
|
|
46
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
47
|
+
|
|
48
|
+
insert into "smoodly_meta" ("key", "value") values ('schema_version', '11')
|
|
49
|
+
on conflict ("key") do update set "value" = excluded."value";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
-- Smoodly: read views for this app's collections, written by `npx smoodly migrate`
|
|
2
|
-
-- (2026-10-
|
|
2
|
+
-- (2026-10-09T12:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
|
|
3
3
|
-- Never edit a written file: change the collection and run migrate again.
|
|
4
4
|
|
|
5
5
|
-- smoodly:collection posts sha256:38ba2918f83ab367
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
-- Smoodly core schema, version 11 (DESIGN §3, static mode, decided 2026-10-09).
|
|
2
|
+
-- Shipped in the smoodly package; `npx smoodly migrate` copies it into supabase/migrations/.
|
|
3
|
+
-- Never edit a published file: the next change is the next file.
|
|
4
|
+
-- The delta over version 10: space_deploys, one row per space holding the last
|
|
5
|
+
-- Deploy press (static mode's button), so a serverless function can tell a
|
|
6
|
+
-- build in flight from one that landed. Additive: no function changes.
|
|
7
|
+
|
|
8
|
+
set client_min_messages = warning;
|
|
9
|
+
|
|
10
|
+
-- The last Deploy press of a space (spec 2026-10-09 static mode §7): who pressed and when; the admin
|
|
11
|
+
-- compares it with the build marker the live site serves to show building, landed or not landed.
|
|
12
|
+
create table if not exists "space_deploys" (
|
|
13
|
+
"space_id" uuid primary key default '00000000-0000-0000-0000-000000000000',
|
|
14
|
+
-- Null until the first press: a removal may make the row first.
|
|
15
|
+
"requested_at" timestamptz,
|
|
16
|
+
"requested_by" text,
|
|
17
|
+
-- When a delivery row last went (an unpublish, a delete): a change the count of newer rows cannot see.
|
|
18
|
+
"removed_at" timestamptz
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
alter table "space_deploys" enable row level security;
|
|
22
|
+
|
|
23
|
+
-- Stamped with the caller's space on insert, as every content table.
|
|
24
|
+
drop trigger if exists "smoodly_a_set_space" on "space_deploys";
|
|
25
|
+
create trigger "smoodly_a_set_space" before insert on "space_deploys"
|
|
26
|
+
for each row execute function "smoodly_set_space"();
|
|
27
|
+
|
|
28
|
+
-- A write key reads and writes its own space's row; no other key reads (spec 2026-09-29 content API contract §8).
|
|
29
|
+
drop policy if exists "smoodly_write" on "space_deploys";
|
|
30
|
+
|
|
31
|
+
drop policy if exists "smoodly_insert" on "space_deploys";
|
|
32
|
+
create policy "smoodly_insert" on "space_deploys" for insert
|
|
33
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
34
|
+
|
|
35
|
+
drop policy if exists "smoodly_update" on "space_deploys";
|
|
36
|
+
create policy "smoodly_update" on "space_deploys" for update
|
|
37
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write')
|
|
38
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
39
|
+
|
|
40
|
+
drop policy if exists "smoodly_delete" on "space_deploys";
|
|
41
|
+
create policy "smoodly_delete" on "space_deploys" for delete
|
|
42
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
43
|
+
|
|
44
|
+
drop policy if exists "smoodly_read" on "space_deploys";
|
|
45
|
+
create policy "smoodly_read" on "space_deploys" for select
|
|
46
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
47
|
+
|
|
48
|
+
insert into "smoodly_meta" ("key", "value") values ('schema_version', '11')
|
|
49
|
+
on conflict ("key") do update set "value" = excluded."value";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
-- Smoodly: read views for this app's collections, written by `npx smoodly migrate`
|
|
2
|
-
-- (2026-10-
|
|
2
|
+
-- (2026-10-09T12:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
|
|
3
3
|
-- Never edit a written file: change the collection and run migrate again.
|
|
4
4
|
|
|
5
5
|
-- smoodly:collection people sha256:929798ebb4fa2bb6
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
-- Smoodly core schema, version 11 (DESIGN §3, static mode, decided 2026-10-09).
|
|
2
|
+
-- Shipped in the smoodly package; `npx smoodly migrate` copies it into supabase/migrations/.
|
|
3
|
+
-- Never edit a published file: the next change is the next file.
|
|
4
|
+
-- The delta over version 10: space_deploys, one row per space holding the last
|
|
5
|
+
-- Deploy press (static mode's button), so a serverless function can tell a
|
|
6
|
+
-- build in flight from one that landed. Additive: no function changes.
|
|
7
|
+
|
|
8
|
+
set client_min_messages = warning;
|
|
9
|
+
|
|
10
|
+
-- The last Deploy press of a space (spec 2026-10-09 static mode §7): who pressed and when; the admin
|
|
11
|
+
-- compares it with the build marker the live site serves to show building, landed or not landed.
|
|
12
|
+
create table if not exists "space_deploys" (
|
|
13
|
+
"space_id" uuid primary key default '00000000-0000-0000-0000-000000000000',
|
|
14
|
+
-- Null until the first press: a removal may make the row first.
|
|
15
|
+
"requested_at" timestamptz,
|
|
16
|
+
"requested_by" text,
|
|
17
|
+
-- When a delivery row last went (an unpublish, a delete): a change the count of newer rows cannot see.
|
|
18
|
+
"removed_at" timestamptz
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
alter table "space_deploys" enable row level security;
|
|
22
|
+
|
|
23
|
+
-- Stamped with the caller's space on insert, as every content table.
|
|
24
|
+
drop trigger if exists "smoodly_a_set_space" on "space_deploys";
|
|
25
|
+
create trigger "smoodly_a_set_space" before insert on "space_deploys"
|
|
26
|
+
for each row execute function "smoodly_set_space"();
|
|
27
|
+
|
|
28
|
+
-- A write key reads and writes its own space's row; no other key reads (spec 2026-09-29 content API contract §8).
|
|
29
|
+
drop policy if exists "smoodly_write" on "space_deploys";
|
|
30
|
+
|
|
31
|
+
drop policy if exists "smoodly_insert" on "space_deploys";
|
|
32
|
+
create policy "smoodly_insert" on "space_deploys" for insert
|
|
33
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
34
|
+
|
|
35
|
+
drop policy if exists "smoodly_update" on "space_deploys";
|
|
36
|
+
create policy "smoodly_update" on "space_deploys" for update
|
|
37
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write')
|
|
38
|
+
with check ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
39
|
+
|
|
40
|
+
drop policy if exists "smoodly_delete" on "space_deploys";
|
|
41
|
+
create policy "smoodly_delete" on "space_deploys" for delete
|
|
42
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
43
|
+
|
|
44
|
+
drop policy if exists "smoodly_read" on "space_deploys";
|
|
45
|
+
create policy "smoodly_read" on "space_deploys" for select
|
|
46
|
+
using ("space_id" = (select "smoodly_current_space"()) and not (select "smoodly_space_key_revoked"()) and (select "smoodly_key_kind"()) = 'write');
|
|
47
|
+
|
|
48
|
+
insert into "smoodly_meta" ("key", "value") values ('schema_version', '11')
|
|
49
|
+
on conflict ("key") do update set "value" = excluded."value";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
-- Smoodly: read views for this app's collections, written by `npx smoodly migrate`
|
|
2
|
-
-- (2026-10-
|
|
2
|
+
-- (2026-10-09T12:01:00.000Z). One block per collection; the marker's hash is the block's SQL, compared on the next run.
|
|
3
3
|
-- Never edit a written file: change the collection and run migrate again.
|
|
4
4
|
|
|
5
5
|
-- smoodly:collection people sha256:929798ebb4fa2bb6
|