Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kairichard/propel-issue-decimal-default

Reproduction of propel bug with type definitions
https://github.com/kairichard/propel-issue-decimal-default

makefile migration php propel schema

Last synced: 9 days ago
JSON representation

Reproduction of propel bug with type definitions

Awesome Lists containing this project

README

        

Propel issue

When working with a legacy database that has field like the following

```mysql
`field_name` decimal(10,3) DEFAULT '1.000' NOT NULL
```

propel generates a wrong migration omitting the `10,3` in the type definition

This can be reproduced using `make test` where a second migration will be created
because the schema does not match with the generated migration.

If you run into trouble on OSX

`Unable to open PDO connection [wrapped: SQLSTATE[HY000] [2002] No such file or directory]`
On Terminal, execute these commands

```bash
sudo mkdir /var/mysql/
sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock
```

I think the schema should look like the `expected_schema.xml` to see the differences run `make migrations && diff generated-reversed-database/schema.xml expected_schema.xml`