flatten monorepo, migrate off Vercel
- Remove penfield (split to own repo on Forgejo) - Move www/ contents to root, rename to wynne.rs - Swap @astrojs/vercel for @astrojs/node, upgrade to Astro 6 - Remove auth-astro/GitHub OAuth (TinyAuth at proxy layer) - Remove Vercel deploy webhook - Switch to local SQLite DB (drop Turso) - Update generate-stats.js for new build output paths
This commit is contained in:
parent
f2acf36784
commit
8a9c56c3d5
52 changed files with 45 additions and 7135 deletions
16
db/config.ts
Normal file
16
db/config.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { defineDb, defineTable, column } from 'astro:db';
|
||||
|
||||
const Guestbook = defineTable({
|
||||
columns: {
|
||||
id: column.number({ primaryKey: true }),
|
||||
name: column.text(),
|
||||
message: column.text(),
|
||||
url: column.text({ optional: true }),
|
||||
createdAt: column.date({ default: new Date() }),
|
||||
approved: column.boolean({ default: false }),
|
||||
},
|
||||
});
|
||||
|
||||
export default defineDb({
|
||||
tables: { Guestbook },
|
||||
});
|
||||
14
db/seed.ts
Normal file
14
db/seed.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { db, Guestbook } from 'astro:db';
|
||||
|
||||
export default async function seed() {
|
||||
await db.insert(Guestbook).values([
|
||||
{
|
||||
id: 1,
|
||||
name: 'test',
|
||||
message: 'hello from dev',
|
||||
url: null,
|
||||
createdAt: new Date(),
|
||||
approved: true,
|
||||
},
|
||||
]);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue