0

I have my website ready on the localhost and use doctrine 1.2 for the database, I want to upload the website to a web host to try it so I changed the parameters (Database, User, Password, Host) of the DNS in the config.php file, but I don't know how to build it since I used to run this command in the CMD:

php doctrine build-all-reload

and I can't use the exec() command or it's alternatives on a shared host.

I use PHP in my website.

So how can I build my database ?

2 Answers2

0

Dump your database on localhost and load it on your webhost using whatever means you have available (phpMyAdmin for example)

Migrations will be worse.

Marek
  • 7,337
  • 1
  • 22
  • 33
  • I thought of the same way you suggested, it worked with me but I needed something more professional, or let's say 'Straight Forward', thanks for your response, hoped to mark it as useful but I have less than 15 reputation. – Abdallah Is'haqat Jul 26 '13 at 14:06
0

If you have a yml file you can create a php script and run the following to create the db from your yml.

$options = array(
'packagesPrefix' => 'Plugin',
'baseClassName'  => 'MyDoctrineRecord',
'suffix' => '.php'
);

Doctrine_Core::generateModelsFromYaml('/path/to/yaml', '/path/to/model', $options);

In general Doctrine_Core has a few methods to create, drop and insert to db after you have set up the connection. It is pretty straight forward.

idipous
  • 2,868
  • 3
  • 30
  • 45