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,45 @@
|
||||
module.exports = {
|
||||
up: async (app) => {
|
||||
const collection = new app.models.Collection({
|
||||
name: 'task_attachments',
|
||||
type: 'base',
|
||||
schema: app.models.NewSchema([
|
||||
app.models.NewSchemaField({
|
||||
name: 'task_id',
|
||||
type: 'relation',
|
||||
required: true,
|
||||
options: { collectionId: 'tasks', maxSelect: 1, cascadeDelete: true }
|
||||
}),
|
||||
app.models.NewSchemaField({
|
||||
name: 'file',
|
||||
type: 'file',
|
||||
required: true,
|
||||
options: { maxSelect: 1, maxSize: 5242880, mimeTypes: [] }
|
||||
}),
|
||||
app.models.NewSchemaField({
|
||||
name: 'filename',
|
||||
type: 'text',
|
||||
options: { maxSize: 255 }
|
||||
}),
|
||||
app.models.NewSchemaField({
|
||||
name: 'mime_type',
|
||||
type: 'text',
|
||||
options: { maxSize: 255 }
|
||||
}),
|
||||
app.models.NewSchemaField({
|
||||
name: 'size',
|
||||
type: 'number',
|
||||
options: { min: 0 }
|
||||
})
|
||||
]),
|
||||
indexes: [
|
||||
'CREATE INDEX idx_task_attachments_task_id ON task_attachments (task_id)'
|
||||
]
|
||||
});
|
||||
return app.save(collection);
|
||||
},
|
||||
down: async (app) => {
|
||||
const collection = await app.findCollectionByNameOrId('task_attachments');
|
||||
return app.delete(collection);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user