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

Added pacing field Course API #11985

Merged
merged 1 commit into from
Mar 30, 2016
Merged

Added pacing field Course API #11985

merged 1 commit into from
Mar 30, 2016

Conversation

clintonb
Copy link
Contributor

@clintonb clintonb force-pushed the clintonb/course-api-pacing branch from c4b66da to 9cdac9a Compare March 30, 2016 03:27
@clintonb
Copy link
Contributor Author

@nasthagiri @peter-fogg please review

@clintonb clintonb force-pushed the clintonb/course-api-pacing branch 2 times, most recently from 3e5f143 to 6fc384c Compare March 30, 2016 11:10
migrations.RemoveField(
model_name='courseoverview',
name='facebook_url',
),
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see the code change associated with this operation. Should it have been committed previously?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It appears the followup work for #11673 was not completed. @nasthagiri is there a ticket for this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused about this. The original PR did have migration code for it. However, since then, the devOps team made a change to revert it in order to support production deployment to multiple workers, concurrently running different versions of the code. @jibsheet At this point, can we go ahead and re-add the removal of this field in the migration file?

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct, the original PR had migration code in it to remove that field from the table without previously having removed it from the model, which would have broken production. That RemoveField calls was removed. You can look at 0008 and 0009 for details.

Now that we've removed the model field in a release, it should be safe to remove the column in another release. 👍 from me, provided we've done the usual work when migrating this table to deal with row versions.

@peter-fogg
Copy link
Contributor

👍 aside from the question about migrations.

name='self_paced',
field=models.BooleanField(default=False),
),
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this added to an existing migration file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a new migration file. See my comment about #11673.

@clintonb clintonb force-pushed the clintonb/course-api-pacing branch from 6fc384c to 1185fff Compare March 30, 2016 18:36
@nasthagiri
Copy link
Contributor

👍 Once you have confirmation from devOps on the migration change.

@clintonb clintonb merged commit bc5e6c8 into master Mar 30, 2016
@clintonb clintonb deleted the clintonb/course-api-pacing branch March 30, 2016 21:27
@sanfordstudent
Copy link
Contributor

@jibsheet @clintonb I think that this is causing an error when running migrations. When I run mine, I receive the following error:

django.db.utils.OperationalError: (1091, "Can't DROP 'facebook_url'; check that column/key exists")

@clintonb
Copy link
Contributor Author

Drat. This is probably because the migration was removed during a release. It might be easiest to reset migrations for the course_overviews app: ./manage.py lms migrate course_overviews zero. Thoughts @nasthagiri?

@jibsheet
Copy link
Contributor

Yeah, we had to do shenanigans because 0008 (to drop) existed for a while, but the point of my changes was to have 0009 detect and put back the field for weird folks in @sanfordstudent's state.

What's the current migration plan for that table? You can feel free to bring over your devstack and show me if that's easier.

@nasthagiri
Copy link
Contributor

Hmm.. since migration #9 conditionally re-adds the field, it should be safe for migration #10 to expect it to be there.

@jibsheet
Copy link
Contributor

Yep - Unfortunately, Sandy had already fixed his local state before I could examine it. If we see this again, I'd like to see the table states etc.

I tested a few things against master just now and was unable to replicate. Will wait for further reports of failure before looking any further.

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.

6 participants