#bookbrainz-devel

/

      • Guest27559
        runnig setup.sh gives me lots of �Missing prerequisites� errors
      • probably due to ERROR: relation "person" does not exist (in sql/test-data.sql)
      • ianmcorvidae
        yeah as I recall the postgres versioning dependency stuff isn't dealt with properly by setup
      • there should be one SQL file that basically just sets up a working DB with test data for you; I think ocharles committed that
      • maybe not
      • DremoraLV
        I think sql versioning files are applied in the wrong order
      • ianmcorvidae
        yeah, they are
      • if you look at the top of each file you can figure out what the order is
      • and apply them directly
      • DremoraLV
        ah, there is date in the header
      • why not rename them?
      • to yyyymmdd-xxx, like the rest
      • ianmcorvidae
        I think it's broken deeper than that, actually
      • anyway the solution is to apply the patches in the proper order manually
      • reosarevok
        Can't the script be modified to follow the right order?
      • Seems more reasonable
      • ianmcorvidae
        probably, but I don't know how
      • and ocharles hasn't worked on it
      • DremoraLV
        the right order can be guessed by filename
      • with the exception of very first version file
      • reosarevok
        I am sure that it can be guessed every time
      • DremoraLV
        person.sql
      • reosarevok
        It just feels weird that we have to guess it instead of sending a patch to fix setup.sh
      • ianmcorvidae
        reosarevok: it can't, the files aren't named in a sane fashion
      • reosarevok
        ianmcorvidae, can you add a BB ticket?
      • (or is there one already?
      • )
      • ianmcorvidae
        yeah, that's a good idea
      • I don't think there is
      • DremoraLV
        I think the most proper way to fix this would be renaming person.sql
      • and do something with test-data.sql
      • ianmcorvidae
        other stuff that shares a date with another patch still gets misapplied
      • DremoraLV
        right...
      • reosarevok
        ianmcorvidae, please add it - you know what is needed better than me
      • DremoraLV
        how do rails solve this problem?
      • ianmcorvidae
        almost nobody uses the style of SQL versioning we do (ours is pure-SQL)
      • DremoraLV
        ah, it's YYYYMMDDHHMMSS_create_products.rb
      • ianmcorvidae
        rails solves it by having non-SQL stuff, I think
      • ah, that also helps :P
      • DremoraLV
        I mean, just the filenames
      • it would make sense to use full time, I think
      • ianmcorvidae
        anyway, I made a ticket and assigned it to ocharles
      • DremoraLV
        ok, I will rename files manually for now
      • ahah, the files are applied in no order %)
      • ianmcorvidae
        yeah, I thought there was more of an issue than just the filenames XD-
      • DremoraLV
        and 2011101-remember-token.sql is missing a digit
      • find sql -type f -name '*.sql' | sort
      • this should work
      • (added | sort)
      • will try now
      • yep, it's all sorted now... backwards
      • ianmcorvidae
        heh
      • time to add -r :)
      • DremoraLV
        there's some embedded perl script, and I can't figure out what exactly it is doing
      • and then there is done | tsort...
      • (I have no shell scripting experience)
      • ianmcorvidae
        the perl script is trying to pull the dependencies out of the header
      • DremoraLV
        ah, so it's parsing
      • ianmcorvidae
        and tsort is topological sort, by dependencies
      • except it does it wrong, far as I can tell :P
      • the perl script that is
      • DremoraLV
        ok, I think running the script 20 times in a row helped %)
      • ianmcorvidae
        hah, well
      • that would do it
      • even if it only applies one patch each time that'll do it :P
      • DremoraLV
        psql -U bookbrainz bookbrainz < sql/test-data.sql
      • this is from README
      • so test-data shouldn't be applied along with other db patches
      • Leftmost joined the channel
      • ianmcorvidae
        it should be applied after... something
      • right after the initial-schema one I think
      • reosarevok
        So, right now we're at pre-NGS values
      • ianmcorvidae
        wrong window, reosarevok, but yes :P
      • reosarevok
        lol
      • Leftmost
        Hmneh?
      • ianmcorvidae
      • Cancelled edits around NGS release
      • more of them for a while, but it looks like we're back down to pre-NGS values
      • Leftmost
        Aha.
      • I should learn to read the logz.
      • ianmcorvidae
        it wasn't in the log
      • well, it was in MY logs
      • I pasted that to reosarevok in PM :P he just responded here
      • Leftmost
        Oh.
      • ianmcorvidae
        I'm working a patch to let people graph arbitrary things (so long as they only graph one thing)
      • reosarevok will use it being 5 AM as an excuse
      • heh, fair enough
      • Leftmost
        Too bad it's only 8pm.
      • I very sorely want to read that as "for arbitrary values of n = 1".
      • ianmcorvidae
        haha
      • reosarevok
        :D
      • Leftmost
        Let X be a nonempty subset of the positive integers. Then it is possible, for an arbitrary n \in X, to graph n things, provided X = {1}.
      • reosarevok
        Leftmost, but but but you can graph 0 things!
      • It is just not very visible
      • ianmcorvidae
        you can also graph >1 things, so long as they're things on the main graph :P
      • reosarevok
        You can graph 1 thing
      • Except if you're pedantic, which allows you to graph 0
      • Or boring enough to just want the main graph, with allows you >1
      • ianmcorvidae
        haha
      • Leftmost
        He said "so long as they only graph one thing". That implies n != 0.
      • ianmcorvidae
        yeah, I guess you couldn't graph 0 with the thing I'm writing
      • you could graph 0 with the main graph, though
      • it makes a very pretty blank box :P
      • actually, probably with the thing I'm doing too, if you put in a bogus name :P
      • reosarevok
        It's not blank
      • Not conceptually
      • It's philosophically full of content
      • ianmcorvidae
        or you're full of bullshit ;)
      • reosarevok
        Yeah, well
      • Leftmost
        I get a bunch of hard drives tomorrow, and then I have to wait until next week to hook them up. Sigh. :P
      • reosarevok
        But I am sure someone agrees with that
      • I mean
      • Some people agree Wales' face on top of wiki pages is not annoying
      • People will argue the strangest things
      • ianmcorvidae
        heh
      • lately I've been getting the programmer who looks like he should be a singer for a death metal band instead
      • rather than Wales
      • reosarevok
        Death metal?
      • I thought it was prog
      • (and everybody knows you can't trust a progrocker, because he's probably on three different drugs)
      • ianmcorvidae
        prog-metal usually has shorter hair, or at least doesn't as universally have long hair :P
      • reosarevok
        Sure
      • But that mustache
      • I mean, look at it
      • Either he's a progrocker
      • Or he's Kid Rock
      • ianmcorvidae
        haha
      • oh, yeah, I'm actually logged in on this computer so I don't see the banners
      • Dremora joined the channel
      • Dremora joined the channel
      • kepstin-laptop joined the channel
      • djce joined the channel
      • ocharles
        DremoraLV: yea, sorry the scripts are in a bad way atm
      • DremoraLV: I have some local commits to try and sort this out
      • reosarevok joined the channel
      • hawke_ joined the channel
      • hawke__ joined the channel
      • hawke__ joined the channel
      • reosarevok_ joined the channel
      • navap joined the channel
      • BrainzHub has left the channel
      • oh good, BrainzHub has woken up
      • DremoraLV: there are now scripts to initialize a clean database, if that's of any interest to you
      • create an empty database, then just pipe init-db.sql into it
      • Leftmost joined the channel
      • https://gist.github.com/68fb8f358274a24479e2 not quite as cool as I thought, but here's me doing asserting the property that "allLanguages" returns all languages in the database
      • just got to rip out the setup function now
      • Leftmost joined the channel
      • CatCat joined the channel
      • quickcheck ftw