Broken DeferredForeignKey inheritance
Thanks for the report, I will look into it. I would like to contribute in a solution as well, but it's hard to understand how the project is structured. Do you have any tips for where to begin? The code's only a few thousand lines, definitely readable in one sitting. You can ignore everything except `peewee.py` for getting started.
This is quite a complicated issue. I will try to do my best to give as much information as possible.

## The code

```
from peewee import *
from models.base_model import BaseModel, BaseHistory

class Company(BaseModel):
    teste = TextField()
    user = DeferredForeignKey('User', null=True)

class CompanyHistory(Company, BaseHistory):
    pass
```

```
from peewee import *
from util.server import SERVER
import datetime

class BaseModel(Model):
    id = BigAutoField()
    created_at_utc = DateTimeField(default = lambda: datetime.datetime.utcnow())
    created_at_local = DateTimeField(default = lambda: datetime.datetime.now())

    class Meta:
        database = SERVER['database']
        legacy_table_names = False

class BaseHistory(Model):
    updated_at_utc = DateTimeField(default = lambda: datetime.datetime.utcnow())
    updated_at_local = DateTimeField(default = lambda: datetime.datetime.now())
```
## The problem

When trying to create `CompanyHistory` table inside the database, the following error message appears:

> peewee.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL)' at line 1")

"What? SQL Syntax? I don't control that, it must be peewee." I thought. So I dig it through:

Using pdb I was able to retrieve the parsed SQL query from peewee:

![screenshot from 2018-12-12 18-28-05](https://user-images.githubusercontent.com/24411365/49896869-b9e33180-fe3b-11e8-892a-f0bc28daad3a.png)

raw:
```
'CREATE TABLE IF NOT EXISTS `company_history` (`id` INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY, `created_at_utc` DATETIME NOT NULL, `created_at_local` DATETIME NOT NULL, `updated_at_utc` DATETIME NOT NULL, `updated_at_local` DATETIME NOT NULL, `teste` TEXT NOT NULL, `user`  NOT NULL)'
```

pretty:
```
CREATE TABLE IF NOT EXISTS `company_history` (
  `id` BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY,
  `created_at_utc` DATETIME NOT NULL,
  `created_at_local` DATETIME NOT NULL,
  `updated_at_utc` DATETIME NOT NULL,
  `updated_at_local` DATETIME NOT NULL,
  `teste` TEXT NOT NULL,
  `user`  NOT NULL
)
```

The type of the user column is missing. 

## Conclusion

Field inheritance is broken for `DeferredForeignKey`

## Workaround

redefine the field:
```
from peewee import *
from models.base_model import BaseModel, BaseHistory

class Company(BaseModel):
    teste = TextField()
    user = DeferredForeignKey('User', null=True)

class CompanyHistory(Company, BaseHistory):
    user = DeferredForeignKey('User', null=True)
    pass
```
