@unoverse-platform/studio 0.1.110 → 0.1.111
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
CHANGED
|
@@ -2,13 +2,9 @@
|
|
|
2
2
|
* A DATASET'S TABLE, AS SQL (docs/unoverse/data/objects/dataset.md, PROPOSED 2026-09-18).
|
|
3
3
|
*
|
|
4
4
|
* The declaration in an object's folder is the schema, so nobody writes SQL and nobody edits a
|
|
5
|
-
* schema by hand. This turns that declaration into
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* WHERE IT GOES. Beside the declaration, as `dataset.sql`, and never into the migrations folder:
|
|
9
|
-
* a dataset's table is made at publish by the platform's one door, and a file kept where the
|
|
10
|
-
* migration runner finds it would be a step someone has to run. This is what ran, written down,
|
|
11
|
-
* so a schema change can be read and compared and is never invisible.
|
|
5
|
+
* schema by hand. This turns that declaration into the statements the platform's one door runs
|
|
6
|
+
* (services/dataset/ensure.ts). Nothing here runs anything, and nothing here is ever written to
|
|
7
|
+
* a file: an org holds no SQL.
|
|
12
8
|
*
|
|
13
9
|
* THE POLICIES ARE PART OF THE TABLE, not a later step. They are written in the same statement
|
|
14
10
|
* block, so a table cannot exist without them. A table created today and secured on Thursday is
|
|
@@ -100,11 +96,10 @@ export function datasetMigration(object: string, d: DatasetDefinition, org?: str
|
|
|
100
96
|
const indexed = d.columns.filter((c) => c.indexed);
|
|
101
97
|
const lines: string[] = [];
|
|
102
98
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (d.description) lines.push(
|
|
107
|
-
lines.push("");
|
|
99
|
+
// NO CALLER TEXT IN A COMMENT (2026-10-04): the org's and the object's names once went into a
|
|
100
|
+
// header here, and a line break in either ended the comment and ran what followed as SQL. What
|
|
101
|
+
// this returns is run, so it holds only names the generator squeezed or the lint checked.
|
|
102
|
+
if (d.description) lines.push(`-- ${d.description.replace(/\s+/g, " ")}`);
|
|
108
103
|
lines.push(`CREATE TABLE IF NOT EXISTS ${t} (`);
|
|
109
104
|
lines.push(` id UUID PRIMARY KEY DEFAULT gen_random_uuid(),`);
|
|
110
105
|
lines.push(` -- WHOSE IT IS, and what it belongs to. Not the author's to name, and not optional:`);
|
|
@@ -18,6 +18,12 @@ export interface Rule {
|
|
|
18
18
|
requires: Requirement;
|
|
19
19
|
/** Why. Required for `public` and `own-gate`, because both need a reason to be read. */
|
|
20
20
|
note?: string;
|
|
21
|
+
/**
|
|
22
|
+
* `false` keeps an author's route out of the audit trail because it changes nothing a person
|
|
23
|
+
* manages: running a node test, laying a canvas out without saving. The trail is how people
|
|
24
|
+
* manage the platform (who made, changed or deleted what), never what runs on it (UNO-103).
|
|
25
|
+
*/
|
|
26
|
+
audit?: false;
|
|
21
27
|
}
|
|
22
28
|
|
|
23
29
|
export const ALL = "*" as const;
|