I am following the official Propel tutorial: Propel chapter 2: build time
But when I execute the vendor/bin/propel sql:build script, nothing happens!
I created a composer.json file and then installed composer, just as explained. The files are succesfully downloaded.
I go to my project: /media/sf_sandbox/test/temp/propel/bookstore
I used the example for the schema.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<database name="bookstore" defaultIdMethod="native">
<table name="book" phpName="Book">
<column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true"/>
<column name="title" type="varchar" size="255" required="true" />
<column name="isbn" type="varchar" size="24" required="true" phpName="ISBN"/>
<column name="publisher_id" type="integer" required="true"/>
<column name="author_id" type="integer" required="true"/>
<foreign-key foreignTable="publisher" phpName="Publisher" refPhpName="Book">
<reference local="publisher_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="author">
<reference local="author_id" foreign="id"/>
</foreign-key>
</table>
<table name="author" phpName="Author">
<column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true"/>
<column name="first_name" type="varchar" size="128" required="true"/>
<column name="last_name" type="varchar" size="128" required="true"/>
</table>
<table name="publisher" phpName="Publisher">
<column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true" />
<column name="name" type="varchar" size="128" required="true" />
</table>
</database>
I used the propel.php example with my username and password, I kept the rest unchanged:
<?php
return [
'propel' => [
'database' => [
'connections' => [
'bookstore' => [
'adapter' => 'mysql',
'classname' => 'Propel\Runtime\Connection\ConnectionWrapper',
'dsn' => 'mysql:host=localhost;dbname=my_db_name',
'user' => 'myusername',
'password' => 'mypassword',
'attributes' => []
]
]
],
'runtime' => [
'defaultConnection' => 'bookstore',
'connections' => ['bookstore']
],
'generator' => [
'defaultConnection' => 'bookstore',
'connections' => ['bookstore']
]
]
];
But when I execute this script: vendor/bin/propel sql:build
But nothing happens, no new database, no error, it just repeats this line:
/media/sf_sandbox/test/temp/propel/bookstore
/media/sf_sandbox/test/temp/propel/bookstore
The path to my project, I just can't get my head around this...