genesis-stack 1.1.2 → 1.1.4
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/README.md +5 -0
- package/package.json +1 -1
- package/stacks/pieces/jskit-mysql.md +1 -0
- package/stacks/pieces/laravel-mysql.md +1 -0
- package/stacks/pieces/laravel-postgresql.md +1 -0
- package/stacks/pieces/laravel-sqlite.md +57 -0
- package/stacks/pieces/laravel.md +1 -1
- package/stacks/pieces/sqlite.md +37 -0
package/README.md
CHANGED
|
@@ -49,6 +49,11 @@ Do not add technology-specific knowledge or dependencies to
|
|
|
49
49
|
`genesis-compiler`, and do not create one catalog package per framework unless
|
|
50
50
|
the single-catalog model becomes genuinely unworkable.
|
|
51
51
|
|
|
52
|
+
The `sqlite` piece covers persistent filenames, transactions, migrations and
|
|
53
|
+
consistent backups. `laravel-sqlite` adds Laravel's `DB_DATABASE` filename
|
|
54
|
+
binding and `DB_CONNECTION=sqlite` default. Hosts own provisioning; applications
|
|
55
|
+
own schema changes and preservation of existing data during adoption.
|
|
56
|
+
|
|
52
57
|
## Resource-estimate proposals
|
|
53
58
|
|
|
54
59
|
JSKIT proposes Vibe64's optional `Resource estimates` section for its concrete
|
package/package.json
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Stack piece: laravel-sqlite
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Laravel SQLite connection, migration, and database filename conventions.
|
|
6
|
+
|
|
7
|
+
## Requires
|
|
8
|
+
|
|
9
|
+
- `laravel`
|
|
10
|
+
- `sqlite`
|
|
11
|
+
|
|
12
|
+
## Conflicts
|
|
13
|
+
|
|
14
|
+
- `laravel-mysql`
|
|
15
|
+
- `laravel-postgresql`
|
|
16
|
+
|
|
17
|
+
## Environment defaults
|
|
18
|
+
|
|
19
|
+
- Default `DB_CONNECTION`: `sqlite`
|
|
20
|
+
|
|
21
|
+
## Resources
|
|
22
|
+
|
|
23
|
+
```json genesis-resource
|
|
24
|
+
{
|
|
25
|
+
"id": "database",
|
|
26
|
+
"kind": "sqlite",
|
|
27
|
+
"environmentAlternatives": [
|
|
28
|
+
{
|
|
29
|
+
"bindings": {
|
|
30
|
+
"database": "DB_DATABASE"
|
|
31
|
+
},
|
|
32
|
+
"preferred": true
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Guidance
|
|
39
|
+
|
|
40
|
+
- Confirm `config/database.php` uses `DB_DATABASE` for the SQLite filename and
|
|
41
|
+
`DB_CONNECTION` for the driver. Keep the project Resource contract aligned
|
|
42
|
+
with any application-specific names. Laravel expects an absolute filename;
|
|
43
|
+
preserve a host-supplied value. For standalone setup, create the selected file
|
|
44
|
+
only if absent and configure its absolute path before migration.
|
|
45
|
+
- Verify the selected PHP runtime includes `pdo_sqlite`. Use the application's
|
|
46
|
+
migrations and seeders, and declare their exact commands in the project setup
|
|
47
|
+
and deployment contracts. Repeated setup must preserve records, the migration
|
|
48
|
+
ledger, and the existing application key; do not use `migrate:fresh` or
|
|
49
|
+
regenerate keys as routine preparation.
|
|
50
|
+
- Consult the installed Laravel version's SQLite configuration documentation at
|
|
51
|
+
`https://laravel.com/docs/database#sqlite-configuration`.
|
|
52
|
+
|
|
53
|
+
## Adoption
|
|
54
|
+
|
|
55
|
+
- Read the database configuration and existing environment before declaring
|
|
56
|
+
readiness. Preserve any existing SQLite data when adopting managed storage.
|
|
57
|
+
Verify migrations on the configured file and keep test connections separate.
|
package/stacks/pieces/laravel.md
CHANGED
|
@@ -55,7 +55,7 @@ conventions. Authoritative framework documentation: https://laravel.com/docs/
|
|
|
55
55
|
- Record actual Composer and frontend installation, test, build, development,
|
|
56
56
|
queue, scheduler, migration, and production operations. Do not assume the
|
|
57
57
|
catalog proposal matches an older application.
|
|
58
|
-
- When the app uses MySQL or
|
|
58
|
+
- When the app uses MySQL, PostgreSQL or SQLite, select the matching Laravel database
|
|
59
59
|
integration so its conventional environment names become explicit.
|
|
60
60
|
|
|
61
61
|
## Environment files
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Stack piece: sqlite
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
SQLite file-backed persistence, migrations, and backup conventions.
|
|
6
|
+
|
|
7
|
+
## Requires
|
|
8
|
+
|
|
9
|
+
- Nothing.
|
|
10
|
+
|
|
11
|
+
## Guidance
|
|
12
|
+
|
|
13
|
+
- Use the application's existing SQLite driver and migration owner. Declare a
|
|
14
|
+
persistent database filename through the `database` resource semantic and
|
|
15
|
+
the environment name the application actually reads. A driver selector such
|
|
16
|
+
as `DB_CONNECTION=sqlite` is configuration, not a database filename.
|
|
17
|
+
- Keep durable database files outside disposable build and release directories.
|
|
18
|
+
A host may supply a persistent filename; do not replace that value with a
|
|
19
|
+
repository-relative default or recreate an existing database during setup.
|
|
20
|
+
- Use transactions, foreign-key enforcement, and bounded busy handling. Prove
|
|
21
|
+
concurrent writes using SQLite itself; a different engine does not establish
|
|
22
|
+
SQLite's locking behavior.
|
|
23
|
+
- Use SQLite's online backup API or `VACUUM INTO` for a consistent backup of a
|
|
24
|
+
running database, including committed WAL data. Do not copy only the main file
|
|
25
|
+
while writers are active. Validate backups and prove restoration before
|
|
26
|
+
removing the original. See `https://www.sqlite.org/backup.html`.
|
|
27
|
+
- Keep test databases separate from development and production. In-memory
|
|
28
|
+
databases are useful for tests but are not persistent application resources.
|
|
29
|
+
|
|
30
|
+
## Adoption
|
|
31
|
+
|
|
32
|
+
- Identify the configured database filename, driver, migration ledger, journal
|
|
33
|
+
mode, and any existing data before changing configuration. Preserve a verified
|
|
34
|
+
snapshot before moving data to a host-managed filename. Do not silently switch
|
|
35
|
+
an existing application to an empty database.
|
|
36
|
+
- Distinguish fresh creation from migrations of retained data. Record app-owned
|
|
37
|
+
migration and optional seed commands without resetting the database.
|