refactor: migrate to monorepo structure with Docker, PocketBase, and e2e tests
- Reorganize into apps/, packages/, docs/, e2e/, pocketbase/ directories - Add Dockerfiles for web, worker, and PocketBase services - Add docker-compose.yml for local orchestration - Add turbo.json for monorepo task management - Add Playwright e2e test infrastructure - Add PocketBase backend with migrations - Remove Vite/Next.js/ESLint/PostCSS config files - Update package.json with workspace dependencies - Add .env.example and .dockerignore
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
module.exports = {
|
||||
up: async (app) => {
|
||||
const collection = new app.models.Collection({
|
||||
name: 'error_logs',
|
||||
type: 'base',
|
||||
schema: app.models.NewSchema([
|
||||
app.models.NewSchemaField({
|
||||
name: 'code',
|
||||
type: 'text',
|
||||
options: { maxSize: 255 }
|
||||
}),
|
||||
app.models.NewSchemaField({
|
||||
name: 'message',
|
||||
type: 'text',
|
||||
options: {}
|
||||
}),
|
||||
app.models.NewSchemaField({
|
||||
name: 'details',
|
||||
type: 'json',
|
||||
options: {}
|
||||
}),
|
||||
app.models.NewSchemaField({
|
||||
name: 'stack_trace',
|
||||
type: 'text',
|
||||
options: {}
|
||||
}),
|
||||
app.models.NewSchemaField({
|
||||
name: 'source',
|
||||
type: 'text',
|
||||
options: { maxSize: 255 }
|
||||
})
|
||||
]),
|
||||
indexes: [
|
||||
'CREATE INDEX idx_error_logs_code ON error_logs (code)',
|
||||
'CREATE INDEX idx_error_logs_source ON error_logs (source)'
|
||||
]
|
||||
});
|
||||
return app.save(collection);
|
||||
},
|
||||
down: async (app) => {
|
||||
const collection = await app.findCollectionByNameOrId('error_logs');
|
||||
return app.delete(collection);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user