toga-ai 1.0.235 → 1.0.236
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,6 +99,19 @@ Before creating a new class in a 1.0 repo:
|
|
|
99
99
|
3. Follow the naming convention exactly, including the type segment.
|
|
100
100
|
4. If you are adding a class to the `library` core repo, be aware it affects all 1.0 apps — review `knowledge/1.0/apps/library/architecture.md` first.
|
|
101
101
|
|
|
102
|
+
## Schema migrations — always in `dbchanges`
|
|
103
|
+
|
|
104
|
+
**Application repos (`worker`, `togadesk`, `togaview`, `tools`, and any other 1.0 app)
|
|
105
|
+
contain no standalone `.sql` migration or schema files.** All schema changes for any
|
|
106
|
+
1.0 database — table creation, `ALTER` statements, index changes, seed data — go in the
|
|
107
|
+
**`dbchanges`** repo.
|
|
108
|
+
|
|
109
|
+
This rule applies regardless of which application repo the feature lives in. Even if you
|
|
110
|
+
are adding a column that only `worker` reads, the `.sql` file goes in `dbchanges`.
|
|
111
|
+
|
|
112
|
+
Never create a `.sql` file inside a 1.0 application repo. The SQL that belongs in those
|
|
113
|
+
repos is only query strings embedded in PHP code — not standalone migration files.
|
|
114
|
+
|
|
102
115
|
## Error handling in controllers
|
|
103
116
|
|
|
104
117
|
Controllers must not let exceptions bubble up to the framework unhandled. Catch specific exceptions, log them, and return an appropriate response.
|
|
@@ -39,6 +39,13 @@ processes background jobs. It's a `_underscore` 2.0 app (`index.php` is just
|
|
|
39
39
|
| S3 `agilant-worker-fallback` | Failed webhook payloads (`webhook-fallback/{uuid}.json`, 7-day lifecycle). |
|
|
40
40
|
| API Gateway `WorkerWebhookIngestion` | `webhook.togahub.com` → Lambda. Lambda Function URLs are blocked by an AWS Org SCP, so API Gateway is the only public entry point. |
|
|
41
41
|
|
|
42
|
+
## Critical repo rule — no SQL migration files
|
|
43
|
+
|
|
44
|
+
**This repo contains PHP and Python only. Never create `.sql` schema-migration files here.**
|
|
45
|
+
All table creation, `ALTER` statements, index changes, and seed data — including for
|
|
46
|
+
`Core.WorkerJobs` and `Core.CronJobs` — go in the `dbchanges2` repo using its
|
|
47
|
+
`YYYY-MM-DD<letter> - <Description>.sql` naming convention.
|
|
48
|
+
|
|
42
49
|
## MySQL tables
|
|
43
50
|
|
|
44
51
|
**`Core.WorkerJobs`** — unified execution record. Key columns: `uuid`,
|
|
@@ -22,6 +22,14 @@ related:
|
|
|
22
22
|
|
|
23
23
|
## Database/SQL
|
|
24
24
|
|
|
25
|
+
### Migration files belong in `dbchanges2`
|
|
26
|
+
|
|
27
|
+
SQL query strings embedded in PHP code (SELECTs, INSERTs, UPDATEs) live in this repo as
|
|
28
|
+
part of normal PHP files. **Standalone `.sql` migration files do not.** Any schema change
|
|
29
|
+
— CREATE TABLE, ALTER TABLE, new index, seed rows — must be placed in the `dbchanges2`
|
|
30
|
+
repo, not here. See `2.0/standards/framework-rules.md` § Schema migrations for naming
|
|
31
|
+
conventions.
|
|
32
|
+
|
|
25
33
|
### Table Design
|
|
26
34
|
|
|
27
35
|
#### **Order of Fields**
|
|
@@ -86,6 +86,22 @@ return [
|
|
|
86
86
|
];
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
+
## Schema migrations — always in `dbchanges2`
|
|
90
|
+
|
|
91
|
+
**Application repos (`worker2`, `api2`, `_underscore`) contain no standalone `.sql`
|
|
92
|
+
migration or schema files.** All schema changes for any 2.0 database — table creation,
|
|
93
|
+
`ALTER` statements, index changes, seed data — go in the **`dbchanges2`** repo.
|
|
94
|
+
|
|
95
|
+
File naming in `dbchanges2`: `YYYY-MM-DD<letter> - <Description>.sql`
|
|
96
|
+
(e.g. `2026-06-30a - Add WorkerJobs failureCode column.sql`).
|
|
97
|
+
|
|
98
|
+
This rule applies regardless of which application repo the feature lives in. Even if you
|
|
99
|
+
are adding a column that only `worker2` reads, the `.sql` file goes in `dbchanges2`.
|
|
100
|
+
|
|
101
|
+
Never create a `.sql` file inside `worker2`, `api2`, `_underscore`, or any other 2.0
|
|
102
|
+
application repo. The SQL that belongs in those repos is only query strings embedded in
|
|
103
|
+
PHP code — not standalone migration files.
|
|
104
|
+
|
|
89
105
|
## Checking dependencies before touching shared code
|
|
90
106
|
|
|
91
107
|
`dependsOn` in `knowledge/registry.json` means a repo extends or depends on another repo's classes. Before modifying a class in a dependency repo (e.g. `_underscore` core):
|
package/package.json
CHANGED