- 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.
28 lines
774 B
SQL
28 lines
774 B
SQL
-- 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);
|