Init of propel for SMS database

This commit is contained in:
Simon Vieille 2018-01-15 13:24:54 +01:00
parent 7bacb3474c
commit ceafee41ec
No known key found for this signature in database
GPG Key ID: 919533E2B946EA10
5 changed files with 52 additions and 2 deletions

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
/propel.yaml
/etc/security/users.json
/vendor
/var
!/var/.gitkeep

1
bin/propel Symbolic link
View File

@ -0,0 +1 @@
../vendor/propel/propel/bin/propel

View File

@ -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"
}
}
}

32
propel-dist.yaml Normal file
View File

@ -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

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<database defaultIdMethod="native" name="default" namespace="App\Model">
<table name="sms" isCrossRef="true">
<column name="id" type="INTEGER" primaryKey="true" required="true" autoIncrement="true"/>
<column name="sender" type="VARCHAR" size="50" required="true" />
<column name="message" type="LONGTEXT" required="true" />
<column name="time" type="BIGINT" required="true" />
<behavior name="timestampable"/>
</table>
</database>