Skip to content

Adjust Shoppy migrations/seeding scripts for the new deployment approach. #115

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sanex3339
Copy link
Contributor

@sanex3339 sanex3339 commented Apr 21, 2025

Adjust Shoppy migrations/seeding scripts for the new deployment approach.

How to verify:

  • e2e CI should pass

@sanex3339 sanex3339 added the enhancement New feature or request label Apr 21, 2025
@sanex3339 sanex3339 self-assigned this Apr 21, 2025
Copy link

vercel bot commented Apr 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
shoppy ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2025 7:18am

@sanex3339 sanex3339 marked this pull request as ready for review April 24, 2025 07:36
@sanex3339 sanex3339 changed the title Adjust Shoppy for the new deployment approach Adjust Shoppy migrations/seeding scripts for the new deployment approach. Apr 24, 2025
@@ -1,4 +1,4 @@
PORT=4173
VITE_APP_METABASE_INSTANCE_URL=https://shoppy.hosted.staging.metabase.com
VITE_APP_METABASE_INSTANCE_URL=https://shoppy.coredev.metabase.com
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When it is merged we still want to point the production app on Vercel to the old instance and switch to the new instance a bit later.

From what I see, we can do it via env vars on the Vercel

Comment on lines +1 to +6
ALTER TABLE "people" ALTER COLUMN "shop_id" SET NOT NULL;--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "people" ADD CONSTRAINT "people_shop_id_shops_id_fk" FOREIGN KEY ("shop_id") REFERENCES "shops"("id") ON DELETE no action ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we don't run migrations on Vercel automatically, we are ok with this change.

@sanex3339 sanex3339 requested review from a team and heypoom April 24, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant