From ceafee41ec2088160da887ea6cfa58e110b652ac Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Mon, 15 Jan 2018 13:24:54 +0100 Subject: [PATCH] Init of propel for SMS database --- .gitignore | 3 +++ bin/propel | 1 + composer.json | 7 +++++-- propel-dist.yaml | 32 +++++++++++++++++++++++++++++ src/App/Resources/propel/schema.xml | 11 ++++++++++ 5 files changed, 52 insertions(+), 2 deletions(-) create mode 120000 bin/propel create mode 100644 propel-dist.yaml create mode 100644 src/App/Resources/propel/schema.xml diff --git a/.gitignore b/.gitignore index 819b16d..66972cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ +/propel.yaml /etc/security/users.json /vendor +/var +!/var/.gitkeep diff --git a/bin/propel b/bin/propel new file mode 120000 index 0000000..9a8fd6d --- /dev/null +++ b/bin/propel @@ -0,0 +1 @@ +../vendor/propel/propel/bin/propel \ No newline at end of file diff --git a/composer.json b/composer.json index 73a2329..9835bda 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,12 @@ { "require": { "silex/silex": "2.*", - "symfony/security": "^3.4" + "symfony/security": "^3.4", + "propel/propel": "~2.0@dev" }, "autoload": { - "psr-4": {"App\\": "src/App"} + "psr-4": { + "App\\": "src/App" + } } } diff --git a/propel-dist.yaml b/propel-dist.yaml new file mode 100644 index 0000000..6722272 --- /dev/null +++ b/propel-dist.yaml @@ -0,0 +1,32 @@ +propel: + database: + connections: + default: + adapter: mysql + classname: Propel\Runtime\Connection\ConnectionWrapper + dsn: "mysql:host=localhost;dbname=androidapi" + user: root + password: root + settings: + charset: utf8 + queries: + utf8: "SET NAMES utf8 COLLATE utf8_unicode_ci, COLLATION_CONNECTION = utf8_unicode_ci, COLLATION_DATABASE = utf8_unicode_ci, COLLATION_SERVER = utf8_unicode_ci" + + paths: + projectDir: src/ + schemaDir: src/ + outputDir: src/ + phpDir: src/ + phpConfDir: etc/propel + sqlDir: var/propel/sql + migrationDir: var/propel/migration + + runtime: + defaultConnection: default + connections: [default] + + generator: + defaultConnection: default + connections: [default] + objectModel: + addClassLevelComment: false diff --git a/src/App/Resources/propel/schema.xml b/src/App/Resources/propel/schema.xml new file mode 100644 index 0000000..e95b4ab --- /dev/null +++ b/src/App/Resources/propel/schema.xml @@ -0,0 +1,11 @@ + + + + + + + + + +
+