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

403/fix deployment failure due to migration desynchronization #404

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

YuraPetrovskyi
Copy link
Collaborator

@YuraPetrovskyi YuraPetrovskyi commented Feb 10, 2025

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review on my code
  • New and previously existing unit tests pass locally with my changes

Description

Relates #403

This PR resolves the deployment failure caused by migration desynchronization after merging all migrations into a single file.

Solution:

  • Removed outdated migration files.
  • Reverted outdated migrations using supabase migration repair --status reverted <migration_ids>
  • Pulled the current schema using supabase db pull
  • Fixed supabase_admin ownership issue by removing unnecessary statements in migration files:
    ALTER PUBLICATION "supabase_realtime_messages_publication" OWNER TO "supabase_admin";
  • Created a new migration file to set avatar column as NOT NULL with a default value.

Files changed

Removed:

  • supabase/migrations/20241128133000_schema_v2_start.sql
  • supabase/migrations/20250124193148_non-nullable-profile-avatar.sql

Added:

  • supabase/migrations/20250207173330_remote_schema.sql
  • supabase/migrations/20250208135136_add-non-nullable-avatar.sql

UI changes

  • No UI changes were made in this PR.

Changes to Documentation

  • No documentation changes were required.

Tests

  • All existing and new tests passed successfully.
  • Manually verified that migration history is now synchronized with the remote database.

Copy link

netlify bot commented Feb 10, 2025

👷 Deploy request for cool-creponne-3e1272 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 1dcc37b

@YuraPetrovskyi YuraPetrovskyi changed the title Fix Deployment Failure Due to Migration Desynchronization (#403) 403/fix deployment failure due to migration desynchronization Feb 10, 2025
Copy link
Collaborator

@OlenaReukova OlenaReukova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All core functions work correctly
Migrations execute without errors
Database schema is synchronised
Previous deployment issues are resolved.

@YuraPetrovskyi, it looks good.

@OlenaReukova OlenaReukova merged commit 1f29c9d into enBloc-org:dev Feb 12, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants