feat: Add Directus setup scripts for collections, fields, and relations
- Created setup-directus-collections.js to automate the creation of tech stack collections, fields, and relations in Directus. - Created setup-directus-hobbies.js for setting up hobbies collection with translations. - Created setup-directus-projects.js for establishing projects collection with comprehensive fields and translations. - Added setup-tech-stack-directus.js to populate tech_stack_items with predefined data.
This commit is contained in:
27
prisma/migrations/add_custom_activities.sql
Normal file
27
prisma/migrations/add_custom_activities.sql
Normal file
@@ -0,0 +1,27 @@
|
||||
-- Add JSON field for dynamic custom activities
|
||||
-- This allows n8n to add/remove activity types without schema changes
|
||||
|
||||
ALTER TABLE activity_status
|
||||
ADD COLUMN IF NOT EXISTS custom_activities JSONB DEFAULT '{}';
|
||||
|
||||
-- Comment explaining the structure
|
||||
COMMENT ON COLUMN activity_status.custom_activities IS
|
||||
'Dynamic activity types added via n8n. Example:
|
||||
{
|
||||
"reading": {
|
||||
"enabled": true,
|
||||
"book_title": "Clean Code",
|
||||
"author": "Robert C. Martin",
|
||||
"progress": 65,
|
||||
"platform": "hardcover"
|
||||
},
|
||||
"working_out": {
|
||||
"enabled": true,
|
||||
"activity": "Running",
|
||||
"duration": 45,
|
||||
"calories": 350
|
||||
}
|
||||
}';
|
||||
|
||||
-- Create index for faster JSONB queries
|
||||
CREATE INDEX IF NOT EXISTS idx_activity_custom_activities ON activity_status USING gin(custom_activities);
|
||||
Reference in New Issue
Block a user