#django

/

      • Palash joined the channel
      • kezabelle has quit
      • brandonw has quit
      • xeberdee
        So I lost 14 days of work. How do I NOT do that next time...
      • bwreilly has quit
      • robbyoconnor has quit
      • amikiri joined the channel
      • robbyoconnor joined the channel
      • KaczuH has quit
      • encod3 joined the channel
      • if south messes up - what do I do after 6 months?
      • ASUChander joined the channel
      • Matt3o12 has quit
      • losse all 6 months?
      • at the cost of altering a fucking table!
      • robbyoconnor has quit
      • Matt3o12 joined the channel
      • robbyoconnor joined the channel
      • brandonw joined the channel
      • charettes has quit
      • ASUchander1 has quit
      • CapnKernel
        xeberdee: What particular problem are you worried about?
      • Zeedox_ has quit
      • As a general principle, develop your migrations on a machine where you are working on a copy of the database
      • Test your migrations several times
      • Have a proper release procedure
      • xeberdee
        I have all the migrations from development
      • CapnKernel
        Then deploy to staging, and then deploy to production
      • xeberdee
        they just don't work
      • CapnKernel
        I don't know what that means.
      • Define "don't work"
      • encod3 has quit
      • The cost (and risk) of having migrations is far lower than the cost (and risk) of not having them.
      • xeberdee
        work = function, don't = opposite of does
      • CapnKernel
        4:40am. Think it might be time I turn in
      • lgp171188 has left the channel
      • xeberdee
        I don't think I can explain any clearer
      • CapnKernel
        "it doesn't work" is an unhelpful sob story.
      • xeberdee
        CapnKernel: Thanks for your help btw.
      • CapnKernel
        Please read the South documentation so you understand the problem that South tries to solve, and the way in which it goes about solving it.
      • You're very welcome.
      • xeberdee
        I don't think django is for me
      • CapnKernel
        Perhaps so
      • If you're looking for something a little lighter, you might consider Flask
      • xeberdee
        I did everything by the book.
      • CapnKernel
        Including read it?
      • xeberdee
        I read the docs, not all south - but
      • CapnKernel
        The first half is ok
      • xeberdee
        you honestly think it's possible to develop a site with reading ?? honestly
      • CapnKernel
        My honest answer is that it takes reading, practice, listening and reflection. There's no royal road.
      • Please do have a look at Flask, as it's also Python, but quite a bit lighter weight than Django
      • btw, what do you use for version control?
      • xeberdee
        you mean git
      • CapnKernel
        git's one way, yes
      • I use it.
      • dinoangelov joined the channel
      • Some people have multiple deployments of their website and don't even have version control. Wow.
      • xeberdee
        as far as I can see it will be beneficial later, but for now - it's just me
      • jaycedars joined the channel
      • CapnKernel
        You don't have to use South
      • If you think you're fine without it, then that's ok.
      • xeberdee
        I don't know how to do it without south - just trash the database and start from scratch every time. I thought the idea was that I could, kkep the data in the db - but now I have to trash it.
      • CapnKernel
        I don't think you have to trash anything
      • xeberdee
        to implement the new functions
      • CapnKernel
        At least South isn't forcing you to trash it.
      • Hell, none of us trash our databases!
      • xeberdee
        no - but I can't get it to work
      • erikcw has quit
      • CapnKernel
        Well, we can help you with that.
      • You might be throwing the baby out with the bathwater
      • xeberdee
        it won't migrate, and it seems I have to go back to initial
      • CapnKernel
        The fact is that database schemas, and the interpretation of the data in our databases, changes over time. South helps keep those changes consistent across deployments, and gives us control about when those changes happen.
      • When you talk in broad terms (for example, "it doesn't work"), it doesn't give us the info we need to help you.
      • robbyoconnor has quit
      • xeberdee
        CapnKernel: I just gave you 4 hours worth :)
      • CapnKernel
        By "it won't migrate", do you mean the message that your categories table already exists?
      • robbyoconnor joined the channel
      • mstrcnvs joined the channel
      • xeberdee
        CapnKernel: yes - that's my simple explanation. I have no other method
      • erikcw joined the channel
      • CapnKernel
        Now, you showed me that migration. Can you share it again with me?
      • xeberdee
        If I knew how to explain it 'correctly' then I could probably fix it.
      • snkcld has quit
      • CapnKernel
        When I ABC it DEFs is enough.
      • For example, "when I try to run the migration, I get the following error message"
      • You shared that with me before, can you show me again please?
      • Nizumzen has quit
      • aribao has quit
      • xeberdee: And is this the migration? http://dpaste.com/1VCKGHQ
      • xeberdee
        CapnKernel: I'm confused now..
      • CapnKernel: it's in the history, but I can't get this mac to show the history in irssi
      • george2 has quit
      • gkap has quit
      • CapnKernel
        Is this the message you're getting? http://dpaste.com/3J9CD51
      • xeberdee
        CapnKernel: If it's easy for you to browse back, then I gave you a list with 1 -2 and the traceback
      • CapnKernel
        "FATAL ERROR - The following SQL query failed: CREATE TABLE "Boo_app_category"
      • xeberdee
        that's 0001 and 0002 migration
      • george2 joined the channel
      • Tjati has quit
      • CapnKernel
        I have them here. Just want to take it one step at a time
      • xeberdee
        CapnKernel: yes - south tries to create it, but it exists
      • CapnKernel
        xeberdee: When you try a migration now, what migration is South attempting to run?
      • I just want to confirm we're talking about the same migration, and the same error
      • I'll walk you through it.
      • xeberdee
        CapnKernel: none.. I faked all of them
      • rtpg joined the channel
      • emperorcezar joined the channel
      • CapnKernel
        So you have created entries in south_migrationhistory for all the migrations?
      • xeberdee
        CapnKernel: I'm in the process of rebuilding the database as it was
      • tombooth has quit
      • CapnKernel
        It helps me help you if you answer the questions I ask.
      • xeberdee
        CapnKernel: yes I did
      • CapnKernel
        Ok.
      • So what happens now when you run ./manage.py migrate?
      • Do you get an error message?
      • xeberdee
        CapnKernel: just a sec
      • CapnKernel
        Ok
      • bearish joined the channel
      • When you say "I faked all of them", how many do you think that would be?
      • rtpg has quit
      • Previously South thought there were 7 migrations it hadn't run: http://dpaste.com/2DMKNTC
      • bearish has quit
      • xeberdee
        CapnKernel: yes
      • CapnKernel
        7 faked migrations, eh?
      • (Just checking)
      • gkap joined the channel
      • aribao joined the channel
      • xeberdee: Please, answer the questions. I'd like to help you, but my time is limited.
      • Tjati joined the channel
      • Itkovian joined the channel
      • Matt3o12 has quit
      • xeberdee: There?
      • xeberdee
        CapnKernel: yes sorry - http://dpaste.com/1BH63PY
      • CapnKernel: this is after I used all the migration history from development
      • CapnKernel
        I see.
      • MrBaboon joined the channel
      • Before I asked you what happens when you run ./manage.py migrate
      • Do you get an error message?
      • prabampm has quit
      • Muchoz has quit
      • LeaChim joined the channel
      • xeberdee
        CapnKernel: relation Boo_app_category already exists
      • MrBaboon has quit
      • CapnKernel: So the result is the same
      • CapnKernel
        Ok.
      • Did you write these migrations?
      • MrBaboon joined the channel
      • xeberdee
        CapnKernel: If I do it by the book and use the entire site history