Initial: pi-skill — 68 skills, 43 extensions, 11 themes for Pi
This commit is contained in:
22
skills/templates/astro-tina-starter/db/config.ts
Normal file
22
skills/templates/astro-tina-starter/db/config.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { defineDb, defineTable, column } from 'astro:db';
|
||||
|
||||
const ConsentLog = defineTable({
|
||||
columns: {
|
||||
id: column.number({ primaryKey: true }),
|
||||
action: column.text(),
|
||||
purpose: column.text(),
|
||||
analytics: column.boolean({ default: false }),
|
||||
marketing: column.boolean({ default: false }),
|
||||
functional: column.boolean({ default: false }),
|
||||
userAgent: column.text({ optional: true }),
|
||||
ip: column.text({ optional: true }),
|
||||
timestamp: column.date(),
|
||||
sessionId: column.text({ optional: true }),
|
||||
},
|
||||
});
|
||||
|
||||
export default defineDb({
|
||||
tables: {
|
||||
ConsentLog,
|
||||
},
|
||||
});
|
||||
7
skills/templates/astro-tina-starter/db/seed.ts
Normal file
7
skills/templates/astro-tina-starter/db/seed.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { db } from 'astro:db'
|
||||
import { sql } from 'astro/db'
|
||||
|
||||
export default async function seed() {
|
||||
// Seed default settings if needed
|
||||
console.log('Database seeded successfully')
|
||||
}
|
||||
Reference in New Issue
Block a user