Forum Feedback Importing and/or copying databases

Problem with the website? Confused about something? Or maybe you just have something you'd like to suggest. This is the place to do it.

Importing and/or copying databases

Postby mindbogglegames » January 10th, 2012, 2:21 am

Hi!

I have a game with 2 different versions of the game(one release and one development version). There is as far as I can see absolutely no way of importing databases or copying databases at this point between them at this point. This means whenever I want to update my release version I have to go in and manually update the release db. This is both kind of error prone and tedious. Is this something that you guys are working on? Or is it not possible for some reason?

Otherwise I love your services ;)

Christian
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm

Re: Importing and/or copying databases

Postby Benjaminsen » January 11th, 2012, 2:58 pm

mindbogglegames wrote:Hi!

I have a game with 2 different versions of the game(one release and one development version). There is as far as I can see absolutely no way of importing databases or copying databases at this point between them at this point. This means whenever I want to update my release version I have to go in and manually update the release db. This is both kind of error prone and tedious. Is this something that you guys are working on? Or is it not possible for some reason?

Otherwise I love your services ;)

Christian



Hey Christian,

We are aware of the lag in the service and have it on the nice-to-have todo to include a build in database ex and importer as you are not the first to request this. Sadly at this time I cannot commit to when it will be released however as we have a few other things we would like to improve / upgrade first.

I know it's not optimal, but it is pretty easy to write a migration tool yourself, as database objects can be passed to createObject directly in a client converter.

/Chris
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Importing and/or copying databases

Postby mindbogglegames » January 11th, 2012, 3:31 pm

Yeah I was thinking of that, but I had opted to have two different projects, one for testing and one for production. Maybe It would be possible to build a client that connects to both projects and then migrates from one PlayerIO project to another I guess? I'm not sure how that works with logins etc...I guess that should work..
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm

Re: Importing and/or copying databases

Postby Henrik » January 11th, 2012, 5:04 pm

It's very simple, you just need to make two different calls to Connect with the different game-ids, and you'll get back two different Client objects, and you can then load all objects in one connection, and do DeleteKey Followed by CreateObject in the other connection.

Just remember to setup a special admin connection in your games that have the required BigDB access rights, or modify the public ones and revert the modifications when you're done.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Importing and/or copying databases

Postby mindbogglegames » January 11th, 2012, 5:34 pm

Thanx!
Yep that sounds pretty easy. But still It would be nice with an import/export/copy database functionality in the web admin interface of course.
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm

Re: Importing and/or copying databases

Postby mindbogglegames » January 19th, 2012, 5:31 pm

Hi

I did as you said and it successfully loads the object from the dev db and creates a new one in the live db. But it doesn't copy any of the values in the database object, it just creates a new empty object in the live db.

This is the code I use

string[] arr1= new string[] {"Levels"};
liveClient.BigDB.DeleteKeys("Settings", arr1);
//levels.Key;
liveClient.BigDB.CreateObject("Settings", levels.Key, levels);

How do I actually create a fully copied database object in the live db?
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm


Return to Feedback



cron