Database Setup Required

To enable the automatic upvote tracking feature, you need to run a one-time database migration. Follow these simple steps:

1

Open your Supabase SQL Editor

Go to your Supabase Dashboard and click on "SQL Editor" in the left sidebar.

2

Copy the migration SQL

Click the button below to copy the SQL migration to your clipboard.

-- Add last_upvote_check column to submissions table
ALTER TABLE submissions ADD COLUMN IF NOT EXISTS last_upvote_check TIMESTAMP WITH TIME ZONE;

-- Create index for efficient querying
CREATE INDEX IF NOT EXISTS idx_submissions_last_upvote_check ON submissions(last_upvote_check);

-- Update existing submissions to have a default value
UPDATE submissions
SET last_upvote_check = submitted_at
WHERE last_upvote_check IS NULL AND submitted_at IS NOT NULL;
3

Run the migration

Paste the SQL into the SQL Editor and click "Run" or press Ctrl+Enter.

4

You're done!

Return to your dashboard and the upvote tracking will work smoothly. The system will automatically refresh upvotes every 15 minutes.

This is a one-time setup

Once you run this migration, you'll never need to do it again. The upvote tracking feature will work automatically for all your submissions.