|
2 years ago | |
---|---|---|
public | 4 years ago | |
src | 4 years ago | |
tests | 4 years ago | |
.gitattributes | 5 years ago | |
.gitignore | 4 years ago | |
LICENSE | 5 years ago | |
README.md | 2 years ago | |
composer.json | 4 years ago | |
gulpfile.js | 4 years ago | |
package.json | 4 years ago | |
phpunit.xml | 4 years ago |
Propeller is a graphical DBMS tool based on Propel.
Clone the project, install the dependencies
git clone https://git.sitilge.id.lv/sitilge/propeller.git propeller && \
cd propeller && \
composer install
Then add propel
command to the excecution path (adjust the /path/to/propeller
respectively)
export PATH=$PATH:/path/to/propeller/vendor/bin/
By default, settings are stored under src/Config/Database/Config
cd src/Config/Database/Config
Next, initialize (the easy way) or setup your own config (the hard way). Let us use the easy way; run
propel init
And use your settings to setup the connection to the DB. The following Q/A will lead you through the questions asked by the final steps of the initializer
Next, it is important to edit the freshly generated schema.xml
and add the behavior Propeller is relying on. Just add the following line after the opening database
tag
<database ...>
<behavior name="Propeller\Models\BehaviorModel"/>
...
</database>
Now it is time to build models - the backbone of Propel and Propeller. Models will be stored under src/Config/Database/Models
propel model:build
Then create the runtime configuration file by executing
propel config:convert
Finally, inform composer about the generated Models
and run
cd ../../../../ && \
composer dump-autoload
Propeller uses the convenient concept of Propel behaviors. The default settings can be overriden by editing the respective ***Query
model, residing under src/Config/Database/Models/Models
. The method that Propeller invokes is init
and edits must be introduced there
class ***Query extends BaseUsersQuery
{
public function init()
{
//disable row delete
$this->setPropellerTableDelete(false);
//show the column in table view
$this->setPropellerTableColumnShow('email');
...
}
}