Files
2012-02-21 01:15:00 -05:00

1 line
10 KiB
JSON

[{"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301459042.562319, "message": "Any gotchas I should be aware of? Or ways to make this go nicely?", "group_id": 81, "id": 477208}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301459074.0193751, "message": "My plan was just to ditch all the migrations and run the --initial on all", "group_id": 81, "id": 477216}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301459027.963042, "message": "Sooo. first South project, and our migrations are out of control (probly almost 300 of them). I was gonna reset things back to initial to restore my sanity.", "group_id": 81, "id": 477205}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301459110.910182, "message": "(and obv truncate the migration history table).. well, really.. I'll probly create a clone so I always have the history and copy records over before baleeting.", "group_id": 81, "id": 477223}, {"user_id": 6807, "stars": [{"date_created": 1301496183.523546, "user_id": 1243}], "topic_id": 16160, "date_created": 1301466082.1755049, "message": "If you've already deployed that on production servers, I wouldn't do it. It will create more problems than it's worth.", "group_id": 81, "id": 478703}, {"user_id": 6807, "stars": [], "topic_id": 16160, "date_created": 1301466121.6888399, "message": "FTR we have a little 600 migration in a project which has been running for 18 months", "group_id": 81, "id": 478708}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301466185.54879, "message": "@gvangool what problems are we talking about? I'm suspicious cause I can't see what bad would happen.. it'd just be like we started using South later... what am I missing?", "group_id": 81, "id": 478712}, {"user_id": 1736, "stars": [{"date_created": 1301467651.879045, "user_id": 5778}, {"date_created": 1301499478.812839, "user_id": 3580}], "topic_id": 16160, "date_created": 1301467354.2229259, "message": "@phill Having to reset the migration status on every server you have seems rather error-prone", "group_id": 81, "id": 478821}, {"user_id": 1736, "stars": [], "topic_id": 16160, "date_created": 1301469199.2295489, "message": "@latestrevision The argument people keep making for us is that it slows down tests. I might set the default to not run migrations there and just do it on the build server though.", "group_id": 81, "id": 479289}, {"user_id": 1677, "stars": [{"date_created": 1301496198.611186, "user_id": 1243}], "topic_id": 16160, "date_created": 1301468054.035948, "message": "Once you've added the thousandth commit to a repo, you don't ask how to reset that to initial; why treat migrations differently?", "group_id": 81, "id": 478999}, {"user_id": 6894, "stars": [], "topic_id": 16160, "date_created": 1301473293.8696301, "message": "If you're not talking about an open source project, I'd say it's a legit thing to do", "group_id": 81, "id": 479624}, {"user_id": 6894, "stars": [], "topic_id": 16160, "date_created": 1301473416.0204279, "message": "the thing is, migrations have to work forever... But over a long period of time it's increasingly difficult to maintain old migrations. It's actually not easy to write migrations that are future-proof", "group_id": 81, "id": 479631}, {"user_id": 6894, "stars": [], "topic_id": 16160, "date_created": 1301473518.4037809, "message": "... you can't really reset them for django-cms, since its an open source project. But for closed-source stuff I say go for it :)", "group_id": 81, "id": 479638}, {"user_id": 6894, "stars": [], "topic_id": 16160, "date_created": 1301473483.0813611, "message": "I came across a problem with django-cms migrations for instance.. the earlier ones were written for a really old version of South and for some reason they would no longer run on my database.", "group_id": 81, "id": 479634}, {"user_id": 25337, "stars": [], "topic_id": 16160, "date_created": 1301473674.824734, "message": "iirc, South has an option where you can turn it off for test runs.", "group_id": 81, "id": 479653}, {"user_id": 25337, "stars": [{"date_created": 1301487151.7067249, "user_id": 5778}, {"date_created": 1301496220.4962909, "user_id": 1243}], "topic_id": 16160, "date_created": 1301473732.7256019, "message": "Here we go: http://south.aeracode.org/docs/settings.html#south-tests-migrate", "group_id": 81, "id": 479656}, {"user_id": 25337, "stars": [{"date_created": 1301499501.247771, "user_id": 3580}], "topic_id": 16160, "date_created": 1301473765.7092321, "message": "@coderanger - so you can turn it off for test runs. You might still want to turn it on occasionally just to make sure you haven't (somehow) broken the migrations...", "group_id": 81, "id": 479658}, {"user_id": 4581, "stars": [], "topic_id": 16160, "date_created": 1301497987.0248311, "message": "I've done this for a project where I refactored several apps, which resulted in models being moved out of one app into another. At that point, some old migrations depended on tables that would no longer exist.", "group_id": 81, "id": 482222}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301499069.797307, "message": "My specific motivations are that old migrations just plain get in the way. They shouldn't if you're suuuper awesome about using South's ORM module, but we're often not (sometimes our migrations really benefit from things like model instance methods).", "group_id": 81, "id": 482354}, {"user_id": 2588, "stars": [{"date_created": 1301499515.412957, "user_id": 3580}], "topic_id": 16160, "date_created": 1301498010.510232, "message": "Acknowledging that reseting migrations in deployed environments could be error prone, I'm in the \"go for it\" camp. I've never seen much value in maintaining a long migration history in practice and I've definitely seen time spent fixing problems that crop up in historical migrations which seems to detract from quality build time.", "group_id": 81, "id": 482225}, {"user_id": 4581, "stars": [], "topic_id": 16160, "date_created": 1301498024.6538019, "message": "I just removed these migrations & recreated them from scratch. I had to manually clean up south's table, but it all worked out ok.", "group_id": 81, "id": 482227}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301499129.716326, "message": "and further, we're timing the cleanup to coincide with an overdue move from MyISAM to InnoDB.. so the South history scrub will be the least of my problems as far as more-trouble-than-it's-worth arguments go :)", "group_id": 81, "id": 482368}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301498973.3793881, "message": "Woah. Thanks for all the responses. Back now.. Couple things... @coderange yeah, we turn them off for tests. @craigds good point about OSS projects.. this isn't. Oh! and we currently have just one production instance and db, plus a half-dozen test envs..", "group_id": 81, "id": 482335}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301499221.067394, "message": "and yeah.. echo what @unbracketed said. South aside, I've pretty much always sort of re-cleaned migration scripts (that were built using a manual system that works similarly to South) every so often.. maybe twice a year.", "group_id": 81, "id": 482375}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301499589.196754, "message": "Further it's worth mentioning that we deploy at least every week... and I can't remember the last time a branch involving the database lived for longer than two.. so these migrations literally have no value to me after two weeks. After that they're mostly bad memories, frankly :)", "group_id": 81, "id": 482407}, {"user_id": 8740, "stars": [], "topic_id": 16160, "date_created": 1301500147.454936, "message": "You'll still be able to go back to the old ones if the files are still around", "group_id": 81, "id": 482464}, {"user_id": 8740, "stars": [], "topic_id": 16160, "date_created": 1301500126.1948359, "message": "@phill It won't blow away the old history, just ignore older ones for new installs. Think of it as having multiple initial entry points into the same long list", "group_id": 81, "id": 482462}, {"user_id": 8740, "stars": [], "topic_id": 16160, "date_created": 1301500176.810524, "message": "I spent an entire flight from Kyiv to London planning it :)", "group_id": 81, "id": 482467}, {"user_id": 8740, "stars": [{"date_created": 1301500007.933068, "user_id": 3580}, {"date_created": 1301526712.8936369, "user_id": 13539}, {"date_created": 1304360641.2666659, "user_id": 31990}, {"date_created": 1313185360.036938, "user_id": 927}], "topic_id": 16160, "date_created": 1301499939.9704399, "message": "Yeah, this is a problem. At some indeterminate future point, I'll finish and commit my branch that allows you to \"rebase\" - i.e. supply a new initial migration that fits into the tree at a certain point.", "group_id": 81, "id": 482434}, {"user_id": 8740, "stars": [], "topic_id": 16160, "date_created": 1301499978.9180901, "message": "Until then, you can reset, provided you have access to all installs of your system to fiddle with the history (so it's fine for in-house stuff, not so good for distributed software like django-cms)", "group_id": 81, "id": 482447}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301500149.91926, "message": "@andrewgodwin yepyep. perfect.", "group_id": 81, "id": 482465}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301500072.528142, "message": "@andrewgodwin that sounds awesome. When that feature comes, I think it's be reaally handy to not have to to blow away the migration history table though.. maybe introduce another column to indicate they were from a previous migration set or something? I still want to be able to go back and line up when a particular data migration happened, for instance....", "group_id": 81, "id": 482458}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301500217.552686, "message": "I never leave my home office (except to fly to SF), so I have no idea how long a flight that might be... but it sounds long.", "group_id": 81, "id": 482471}, {"user_id": 8740, "stars": [], "topic_id": 16160, "date_created": 1301500366.3804021, "message": "only about 4 or 5 hours, it's not too bad", "group_id": 81, "id": 482491}, {"user_id": 3580, "stars": [], "topic_id": 16160, "date_created": 1301500441.7852421, "message": "oh good. spending more time than that thinking about rebasing migrations sounds ill-advised :)", "group_id": 81, "id": 482503}]