@biffo/cli 0.324.11 → 0.324.12
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.
|
@@ -99,7 +99,9 @@ loudly (ADR-0005 §4) rather than silently re-applying or silently skipping. A
|
|
|
99
99
|
later change to your baseline data ships as a new, additively-numbered file —
|
|
100
100
|
see `db/seed/000_default_widget.sql`'s own header comment for the full
|
|
101
101
|
contract and the `INSERT ... SELECT ... WHERE NOT EXISTS` shape every file
|
|
102
|
-
here must follow.
|
|
102
|
+
here must follow. Every seed file also opens with `SET search_path TO public;` (after its
|
|
103
|
+
banner comment) — the instance's DDL guard requires it, and your tables and
|
|
104
|
+
`users` live in `public`.
|
|
103
105
|
|
|
104
106
|
This is a second, complementary mechanism to the one below — not a
|
|
105
107
|
replacement for it. `seed_default_widget()` in `plugin.py` still demonstrates
|
|
@@ -29,6 +29,15 @@
|
|
|
29
29
|
-- known tenant in a single statement, from the instance's own deploy step.
|
|
30
30
|
-- Both are legitimate; which one to use for YOUR plugin is exactly the
|
|
31
31
|
-- question BiffoPluginBase's class docstring answers.
|
|
32
|
+
--
|
|
33
|
+
-- SET search_path: the instance's DDL guard (test_ddl_import_conventions.py,
|
|
34
|
+
-- biffo-template#1338) requires every module to open with one, so its bare
|
|
35
|
+
-- names resolve the same however the chain is applied. This seed's table and
|
|
36
|
+
-- `users` both live in `public` (created by Alembic, not by a per-import
|
|
37
|
+
-- schema), and the guard resolves a vendored `_plugin-<name>/` directory to
|
|
38
|
+
-- `public` — do not change this to the directory name (biffo-template#2132).
|
|
39
|
+
SET search_path TO public;
|
|
40
|
+
|
|
32
41
|
INSERT INTO example_widgets (id, tenant_id, name, description, is_active, created_at, updated_at)
|
|
33
42
|
SELECT
|
|
34
43
|
gen_random_uuid()::text,
|