aipescience / daiquiri

A framework for the publication of scientific databases
GNU Affero General Public License v3.0
8 stars 2 forks source link

New database doesn't appear in Database Browser #1

Open FerCampos opened 11 years ago

FerCampos commented 11 years ago

Hi I would like to add a new scientific database to my daiquiri instance. I have edited my init.php file and I have added the name of the new database (curiehz_Planck1): 'user' => array( 'dbname' => 'daiquiri_curiehzuser%', 'additional' => array('curiehzAHF','curiehz_Planck1'),

(curiehzAHF is the old database name, and it's working fine with this one)

I have also replicated the data.databases config for the new one: 'data' => array( 'databases' => array( array( 'name' => 'curiehzAHF', 'description' => 'CurieHZ box AHF catalog', 'adapter' => 'user', 'publication_role_id' => '1', 'publication_select' => '1', 'publication_update' => '0', 'publication_insert' => '0', 'publication_show' => '0', 'autofill' => '1', ), array( 'name' => 'curiehz_Planck1', 'description' => 'CurieHZ box with Planck1 cosmology', 'adapter' => 'user', 'publication_role_id' => '1', 'publication_select' => '1', 'publication_update' => '0', 'publication_insert' => '0', 'publication_show' => '0', 'autofill' => '1', ),

    )

I have executed the new SQL user permissions to allow the access to the new database (executing in a mysql prompt the output of ./init.php -u).

I have tried, with my init.php script, to sync (-s) and re-init (-i), but the new database doesn't appear in the database browser. I have even re-generated the application.ini file (./init.php -a).

Am I missing something??

I have noticed that ./init.php -i doesn't take almost any time to execute, and I think that the autofill option should last a bit: the new database has 2-3 hundreds of tables.

Thank you very much in advance. Regards Fer

jochenklar commented 11 years ago

Hi,

./init.php -s only works it the table is empty, which in your case is not the case.

you need to go to /data/databases/create and create the database entry using the form.

FerCampos commented 11 years ago

Thanks @jochenklar!! I have tried that way and looks like the auto-fill option takes so long that triggers some kind of PHP?? timeout and not all the tables from the scientific database appear in the Database Browser. Are there any way to do it with the init.php script?? I remember that @adrpar introduced a warning message due to the long time that the auto-filling can take, so maybe it could be better to add new and big databases from the script, but I don't know how to do it without starting from scratch and deleting the users databases...

Cheers Fer

adrpar commented 11 years ago

Hi @FerCampos!

I could remove an unnecessary call to the database in the meta creation routine. Could you please pull the newest version and see if this mad any improvement? Further I try to set the php execution time to larger values. However this can only be done if PHP does not run in save mode (so it could be, that this does not work). Then you would need to set the value manually in php.ini to larger values.

Let me know if there's an improvement!

Cheers,

Adrian

FerCampos commented 10 years ago

Incrementing timeout limit at php.ini didn't help... :(