SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    May 2004
    Location
    USA
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Deployment (redeployment)

    I'm a little confused about something and I hope someone can help me out a bit.

    I've got a small ap up on a shared server. I've done A LOT of database changes locally and I'm ready to deploy now.

    I'm not using subversion or capistrano - so what will happen when I migrate things to the server?

    Will I lose the 'live' data I have? Would it matter if I was using subversion or capistrano?

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Location
    Miami, FL
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, if it's the DB you're worried about all you have to do is make a backup of the data in your DB, redeploy, rake db:migrate, and import your backed up DB file. If you don't you'll purge the data when you migrate.

  3. #3
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    db:migrate does not delete data unless you are performing a migration that is destructive (i.e. drop table, remove column etc.).

  4. #4
    SitePoint Addict
    Join Date
    May 2004
    Location
    USA
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So if I have a live site with say 2 models that have relationships and I let it run that way for a few weeks and then add 3 more models that have relationships with the first 2 will it break things?

    I've just done the migration to my existing site - but no relationships and it's all well. Just a little concerned about down the road.... and figure It's time to make sure I understand so I don't mess myself up.

  5. #5
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It won't break.

  6. #6
    SitePoint Addict
    Join Date
    May 2004
    Location
    USA
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks all. Obviously I'll back things up. I'm just nervous because I KNOW I'll want to add in some more models down the road as the site grows.

    Puts my mind at rest so thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •