Delete Existing Production Database ?

Are you having problems with something in open campground? Maybe someone can give some help here. Post as much information as you can to clearly define your problem.
Posts: 1
Joined: Fri May 02, 2014 7:23 am
Location: Sacramento Mountians, Lincoln National Forest, New Mexico, USA

Delete Existing Production Database ?

Postby LzDay » Fri May 02, 2014 7:44 am

Last season I attempted to run OpenCampground in parallel with the paper, index cards,etc that this Campground now utilizes. Is there a way to delete the PRODUCTION database from last year so I can use the system as a clean slate this season ?

Site Admin
Posts: 20
Joined: Sun Mar 17, 2013 5:17 pm
Location: Prescott, AZ USA

Re: Delete Existing Production Database ?

Postby nsche » Fri May 02, 2014 8:39 am

There is no 'one button' process to do this. What would work best depends on how clean you want to start. If you want to start completely from the beginning without any of the configuration you may have done you can do this:
If installed from an Open Campground CD reconfigure to turn off automatic start on boot
Bring up InstantRails (C:\InstantRails2\InstantRails.exe)
Right click on the bold black I in box in the upper left.
Select Rails Applications->Open Ruby Console Window (the following is entered in the black window that appears)

Code: Select all

      cd OpenCampground{your version}
      set RAILS_ENV=production
      rake db:reset
      exit (when done)

This will reinitialize the database and you can go from there. Of course this means you will loose all those spaces you configured etc. Configuring the spaces is now a lot simpler. Update the system to make sure you have the latest version (currently 1220) and the space configuration carries information forward so if you were defining 10 similar spaces you would only end up entering the names of the spaces after you defined the first one.

Alternatively you can go into the reservation list and in-park list and one by one delete/checkout all of the reservations that may be in the system. You then can go to Archives and select all and delete selected. The campers you entered will remain but the rest should be gone.

The third way is to do a backup. You can then edit the backup file (it is a text file) and delete the data you no longer want. This is risky unless you know a bit about databases and the schema of this database.
Norm Scherer
Open Campground Author

Return to “Help with Open Campground”

Who is online

Users browsing this forum: No registered users and 0 guests