Closed pharpend closed 9 years ago
Sweet! I'll check this out later this week, I hope. Got some high pri stuff to do in the meanwhile.
Noting that this is blocked by https://github.com/yesodweb/persistent/issues/403 as far as being available for actual deployment (although not blocked for letting people build with -fdev to contribute), but we could figure out the workarounds so that we can go ahead. But we must address this one way or another in order to accept this PR
Also, there is a bug about the bottom border for the navbar not being seen (though it seems to render, it isn't actually visible to real users)
I think this is ready to be merged now.
The persistent guy recommended outright disabling automatic migrations, because they aren't exactly great practice in the first place, so that's what I did. I commented out the mkMigrate
and migrateAll
stuff, and everything is peachy now.
what is the effect of losing those migrate things? What happens now to make the DB what we need? And do we still process the manual migration files then?
@wolftune Someone correct me if I'm wrong, we can still generate the migrateXY
files, we just have to run them all by hand.
OR
We can do the rails thing, where we have a Haskell script that runs all of the migrations as separate functions. Whenever someone wants to make a migration, you just add a function to the Haskell script, and add the function to a list.
Then, when it's time to migrate, you just manually run the Haskell script, and everything is peachy.
(Rails actually has a number of files each containing a migration, but that doesn't matter...)
My real nitpick with the current migration system is that dired doesn't show them in order:
/home/pete/src/snowdrift/migrations:
total used in directory 228 available 219788676
drwxr-xr-x 2 pete pete 4096 May 31 07:59 .
drwxr-xr-x 20 pete pete 4096 Jun 16 16:30 ..
-rw-r--r-- 1 pete pete 1310 Apr 30 17:29 migrate1
-rw-r--r-- 1 pete pete 341 Apr 30 17:29 migrate10
-rw-r--r-- 1 pete pete 585 Apr 30 17:29 migrate11
-rw-r--r-- 1 pete pete 48 Apr 30 17:29 migrate12
-rw-r--r-- 1 pete pete 830 Apr 30 17:29 migrate13
-rw-r--r-- 1 pete pete 958 Apr 30 17:29 migrate14
-rw-r--r-- 1 pete pete 182 Apr 30 17:29 migrate15
-rw-r--r-- 1 pete pete 2617 Apr 30 17:29 migrate16
-rw-r--r-- 1 pete pete 37 Apr 30 17:29 migrate17
-rw-r--r-- 1 pete pete 1968 Apr 30 17:29 migrate18
-rw-r--r-- 1 pete pete 1646 Apr 30 17:29 migrate19
-rw-r--r-- 1 pete pete 316 Apr 30 17:29 migrate2
-rw-r--r-- 1 pete pete 114 Apr 30 17:29 migrate20
-rw-r--r-- 1 pete pete 762 Apr 30 17:29 migrate21
-rw-r--r-- 1 pete pete 254 Apr 30 17:29 migrate22
-rw-r--r-- 1 pete pete 1390 Apr 30 17:29 migrate23
-rw-r--r-- 1 pete pete 483 Apr 30 17:29 migrate24
-rw-r--r-- 1 pete pete 1438 Apr 30 17:29 migrate25
-rw-r--r-- 1 pete pete 72 Apr 30 17:29 migrate26
-rw-r--r-- 1 pete pete 925 Apr 30 17:29 migrate27
-rw-r--r-- 1 pete pete 589 Apr 30 17:29 migrate28
-rw-r--r-- 1 pete pete 289 Apr 30 17:29 migrate29
-rw-r--r-- 1 pete pete 59 Apr 30 17:29 migrate3
-rw-r--r-- 1 pete pete 965 Apr 30 17:29 migrate30
-rw-r--r-- 1 pete pete 2007 Apr 30 17:29 migrate31
-rw-r--r-- 1 pete pete 379 Apr 30 17:29 migrate32
-rw-r--r-- 1 pete pete 265 Apr 30 17:29 migrate33
-rw-r--r-- 1 pete pete 86 Apr 30 17:29 migrate34
-rw-r--r-- 1 pete pete 52 Apr 30 17:29 migrate35
-rw-r--r-- 1 pete pete 206 Apr 30 17:29 migrate36
-rw-r--r-- 1 pete pete 56 Apr 30 17:29 migrate37
-rw-r--r-- 1 pete pete 133 Apr 30 17:29 migrate38
-rw-r--r-- 1 pete pete 420 Apr 30 17:29 migrate39
-rw-r--r-- 1 pete pete 485 Apr 30 17:29 migrate4
-rw-r--r-- 1 pete pete 74 Apr 30 17:29 migrate40
-rw-r--r-- 1 pete pete 275 Apr 30 17:29 migrate41
-rw-r--r-- 1 pete pete 436 Apr 30 17:29 migrate42
-rw-r--r-- 1 pete pete 384 Apr 30 17:29 migrate43
-rw-r--r-- 1 pete pete 1774 Apr 30 17:29 migrate44
-rw-r--r-- 1 pete pete 135 Apr 30 17:29 migrate46
-rw-r--r-- 1 pete pete 210 Apr 30 17:29 migrate48
-rw-r--r-- 1 pete pete 7289 Apr 30 17:29 migrate49
-rw-r--r-- 1 pete pete 2158 Apr 30 17:29 migrate5
-rw-r--r-- 1 pete pete 1088 Apr 30 17:29 migrate6
-rw-r--r-- 1 pete pete 264 Apr 30 17:29 migrate60
-rw-r--r-- 1 pete pete 389 Apr 30 17:29 migrate61
-rw-r--r-- 1 pete pete 141 Apr 30 17:29 migrate62
-rw-r--r-- 1 pete pete 5785 May 1 20:27 migrate63
-rw-r--r-- 1 pete pete 955 May 18 20:34 migrate64
-rw-r--r-- 1 pete pete 112 May 31 07:59 migrate65
-rw-r--r-- 1 pete pete 2056 Apr 30 17:29 migrate7
-rw-r--r-- 1 pete pete 77 Apr 30 17:29 migrate8
-rw-r--r-- 1 pete pete 71 Apr 30 17:29 migrate9
@pharpend the real problem with the current situation is that we can run into conflicting migration file names from multiple contributors not knowing about each other and then really hard to manage merging cleanly out in the wild once files are shared around… we need a reliable unique-name for migrations regardless of whether they are in files or in a script. Rails uses timestamp to avoid name collisions I'm told.
Anyway, I think we want to solve this situation or at least agree on how we move forward and then we could merge this and move to 7.10…
@wolftune I'm aware of the race condition problem, I was kidding =p.
I don't think it's tenable for us to disable automatic commands right now.
I'm beginning to think we should leave 7.10 alone until after beta.
@chreekat fine with me as long as we get Stack working fully to help people with GHC 7.10 install 7.8 for us without having to use Vagrant. However, if @pharpend or anyone totally makes everything work with 7.10 without any compromise (no losing of migrations, all is solid etc), then we can go forward with it then.
Sure. Until then, however, I may close this PR (and related) for sanity and sanitation.
On Tue, Jun 23, 2015 at 5:12 PM, Aaron Wolf notifications@github.com wrote:
@chreekat https://github.com/chreekat fine with me as long as we get Stack working fully to help people with GHC 7.10 install 7.8 for us without having to use Vagrant. However, if @pharpend https://github.com/pharpend or anyone totally makes everything work with 7.10 without any compromise (no losing of migrations, all is solid etc), then we can go forward with it then.
— Reply to this email directly or view it on GitHub https://github.com/snowdriftcoop/snowdrift/pull/308#issuecomment-114680296 .
I vote to close this, as stack fixes the 7.10 problem gracefully.
I'm glad stack works.
:rocket: the future!
This is backwards-compatible with GHC 7.8. I tested it on a FreeBSD box running 7.8.3.
There is one notable change: instead of having one cabal.config file for all, there are now two separate cabal.config files corresponding to your GHC version. Good ol' cabal.config is now .gitignored.
On the off chance that cabal can't figure out the appropriate versions on its own, you can link the appropriate cabal.config.7.* file to cabal.config.
The 7.8 file is pulled from Stackage LTS 1.5. Again, I tested it, everything works.