Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Migrate Library to supabase #4061

Open
13 tasks
mariojsnunes opened this issue Jan 7, 2025 · 0 comments
Open
13 tasks

[feature] Migrate Library to supabase #4061

mariojsnunes opened this issue Jan 7, 2025 · 0 comments

Comments

@mariojsnunes
Copy link
Contributor

mariojsnunes commented Jan 7, 2025

An overview of what needs to be migrated

Database Schema

Projects
Categories (done)
Tags (done)
Images (done)
Useful (done)
Moderation
Steps
File download counters (separate table)

Migration

  • Data and Images
  • Comments

Moderation Flow

There are notifications and emails being sent on moderation status changes

Technical details

  • Create the required tables locally
    • Decide between storing the steps in JSON or a separate table
    • Categories, tags and usefulVotes are already done for questions, the same tables/approach should be reused
    • For images, follow the same approach as questions
    • Create a table for storing file download counters (must be a way to tie the file to a project, can make it generic though)
  • Generate the migration script supabase db diff --file [migration_name]
  • Update the project page to supabase data
  • Update the project edit form to use supabase data (use a service approach instead of store - check questionService.ts)
  • Update library page (project list with text search and filters)
  • Update comments to use the newer component (same as questions)
  • Create endpoint to download a project file, and increment download count server-side
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant