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

Remove latest_version, sitespecific and is_listed columns from 'addons' #4596

Merged
merged 1 commit into from Feb 6, 2017

Conversation

diox
Copy link
Member

@diox diox commented Feb 6, 2017

(Those columns have already been removed in dev/stage/prod environments)

Fix mozilla/addons#3914 mozilla/addons#3485, mozilla/addons#3621

(Those columns have already been removed in dev/stage/prod environments)
ALTER TABLE addons drop foreign key latest_version_refs_versions;
END IF;
IF EXISTS (SELECT * FROM information_schema.table_constraints WHERE table_schema = (SELECT DATABASE()) AND table_name = 'addons' AND constraint_name = 'latest_version_refs_id_46aa95ab') THEN
ALTER TABLE addons drop foreign key latest_version_refs_id_46aa95ab;
Copy link
Member

Choose a reason for hiding this comment

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

is id_46aa95ab; consistent across dev, stage & prod at least? (locally?)

Copy link
Member Author

Choose a reason for hiding this comment

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

It's what django generates, so it should be consistent across all envs that used syncdb (you can check locally if you still have it); the one above, latest_version_refs_versions is what we had on dev/stage/prod for some reason.

Copy link
Member

@eviljeff eviljeff left a comment

Choose a reason for hiding this comment

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

I'm exactly an expert on create procedure syntax, but it seems to make sense to me

@eviljeff
Copy link
Member

eviljeff commented Feb 6, 2017

gah, I'm not exactly an expert.

@diox diox merged commit a754b10 into mozilla:master Feb 6, 2017
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.

Remove db column 'addons.sitespecific'
2 participants