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

Schema update #116

Closed
wants to merge 1 commit into from
Closed

Schema update #116

wants to merge 1 commit into from

Conversation

ariga-bot
Copy link
Collaborator

Removed the 'profile_picture_url' column from the 'users' table.

Copy link
Contributor

atlas migrate lint on dirs/ecommerce/migrations

Status Step Result
1 new migration file detected 20241121131350.sql
ERD and visual diff generated View Visualization
Analyze 20241121131350.sql
1 reports were found in analysis
Destructive changes detected
Dropping non-virtual column "profile_picture_url" (DS103)
Read the full linting report on Atlas Cloud

Comment on lines +1 to +2
-- Modify "users" table
ALTER TABLE `users` DROP COLUMN `profile_picture_url`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Caution

destructive changes detected
Dropping non-virtual column "profile_picture_url" DS103

Add a pre-migration check to ensure column "profile_picture_url" is NULL before dropping it

Suggested change
-- Modify "users" table
ALTER TABLE `users` DROP COLUMN `profile_picture_url`;
-- atlas:txtar
-- checks/destructive.sql --
-- atlas:assert DS103
SELECT NOT EXISTS (SELECT 1 FROM `users` WHERE `profile_picture_url` IS NOT NULL) AS `is_empty`;
-- migration.sql --
-- Modify "users" table
ALTER TABLE `users` DROP COLUMN `profile_picture_url`;

Ensure to run atlas migrate hash --dir "file://dirs/ecommerce/migrations" after applying the suggested changes.

@giautm giautm closed this Dec 22, 2024
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