Create DataBase

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
6/12/2012 6:52:17 AM
Gravatar
Total Posts 88

Create DataBase

Hi,

I would try to implement an option on mojoPortal setup solution to create a database if the connection fail on first setup runs.

I have an installshield to deploy my mojoportal solution, on this setup its required to user insert the Database Server, DataBase User, DataBase Password and Database Name for mojo.

Now if i run the setup when site is ready the database doesnt exist and the setup doesnt run.

My idea is to create a key on appSettings "CreateDatabse" and if is true and the system can connect to the server mojo create the database. The database name is on ConnectionString.

I dont want to fork mojo solution but now i will implement this but it possible mojo add this feature?

thanks

6/12/2012 7:43:04 AM
Gravatar
Total Posts 18439

Re: Create DataBase

Hi,

I don't want to put anything in mojoPortal that requires the web app to write to web.config nor user.config for reasons explained in this article. If you create a database automatically then you need to automate creation of the connection string and this I do not want to do for security reasons.

I also don't see any reason it will require forking the code if you want to implement creation of a database. You can easily create your own custom .aspx file using inline code, like /Setup/CreateDb.aspx and you can navigate to your custom page before navigating to /Setup/Default.aspx

Best,

Joe

6/12/2012 8:09:26 AM
Gravatar
Total Posts 88

Re: Create DataBase

Hi,

Ok, i don't explain very well.

mojoPortal doesn't write on Web.config the install shield I've created do this. My question is if its possible to mojoPortal has a key on web.config when the setups runs and checks that database doesn't exists, mojo creates the database defined on connection string and runs the setup...

thanks...

 

6/12/2012 8:19:10 AM
Gravatar
Total Posts 18439

Re: Create DataBase

If you want to implement that, please send me the changed files and put comments around your changes so it is easy for me to find them. I will review it and consider including it. Keep in mind that we support 6 database platforms and your changes only apply for MS SQL.

Please also send me a signed contributor agreement, you can download it from here.

Best,

Joe

6/12/2012 8:22:41 AM
Gravatar
Total Posts 88

Re: Create DataBase

Ok Joe,

Thanks, when I've finish i will send you...

You must sign in to post in the forums. This thread is closed to new posts.