Check constraint not working with .create_table()
I looked into this matter some more, and apparently it is a MySQL issue:

> The CHECK clause is parsed but ignored by all storage engines.

[http://dev.mysql.com/doc/refman/5.5/en/create-table.html](MySQL docs)
(Version 5.5 corresponds with the one I use, but note that the latest documentation (5.7) also documents this.)

So, I'm sorry for wasting your time, this issue can be closed.

Hi,

I'm trying to define a simple `CHECK` constraint on a table, and to create it with `.create_all()`. It can't get it to work. I get no errors, but when I look at the table definition of the created table, it has no constraints defined.

My models file:

``` python
from peewee import *

db = MySQLDatabase('my_db_name, host='127.0.0.1', port=3306, user='my_user', password='my_secret') 

class BaseModel(Model):
    class Meta:
        database = db

class Film(BaseModel):
    title = CharField()
    year = IntegerField(constraints=[Check('year > 0')])
```

The table definition according to `SHOW CREATE TABLE film`:

``` mysql
CREATE TABLE `film` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `year` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
```

I have browsed through peewee's source code, and I get the feeling any constraints other than the `FOREIGN KEY` aren't even touched by the `.create_table()` method. Relevant part quoted from its definition:

``` python
for field in meta.get_fields():
            columns.append(self.field_definition(field))
            if isinstance(field, ForeignKeyField) and not field.deferred:
                constraints.append(self.foreign_key_constraint(field))
```

Be warned, I'm a relative newbie, so I might be foolishly mistaken.

Thank you,
Bart
