Skip to content

Commit 95644de

Browse files
committed
fix: update name for system hexes; fix sql seed issue
1 parent 702702b commit 95644de

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Hex v2
1+
# Project Hex
22

33
![Hex v2](./public/hex-v2.png)
44

functions/api/gallery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const onRequestGet: PagesFunction<Env> = async (context) => {
2222
return json(engines.results.map(e => ({
2323
id: e.id,
2424
ownerId: e.owner_id,
25-
ownerName: e.is_system_default ? 'Hex Project' : e.owner_name,
25+
ownerName: e.is_system_default ? 'Project Hex' : e.owner_name,
2626
ownerIcon: e.owner_icon,
2727
definition: JSON.parse(e.definition as string),
2828
version: e.version,

scripts/seed-default-engines.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
-- This script creates the system user and inserts the three default engines
33
-- It uses INSERT OR IGNORE to be idempotent (safe to run multiple times)
44

5+
-- Enable foreign keys and start transaction
6+
PRAGMA defer_foreign_keys=ON;
7+
PRAGMA foreign_keys=OFF;
8+
59
-- Create system user (if not exists)
610
INSERT OR IGNORE INTO profiles (
711
id,
@@ -93,3 +97,6 @@ INSERT OR IGNORE INTO engines (
9397
datetime('now'),
9498
datetime('now')
9599
);
100+
101+
PRAGMA foreign_keys=ON;
102+
PRAGMA defer_foreign_keys=OFF;

0 commit comments

Comments
 (0)