database.execute_sql('PRAGMA foreign_keys = 1;') not working
So some database pragmas have to be executed once, before any tables are created (journal_mode for example). Other pragmas, like "foreign_keys", have to be issued at the start of every connection. The recommended way to do this with peewee is to declare your pragmas as part of your db constructor:

```python

# Ensure foreign_keys pragma is set on every connection.
db = SqliteDatabase('my_app.db', pragmas={'foreign_keys': 1})
```

In my testing the pragma works just fine when executed manually via `execute_sql()`. See:

```python

from peewee import *

db = SqliteDatabase(':memory:')

class User(Model):
    username = TextField()
    class Meta:
        database = db

class Tweet(Model):
    user = ForeignKeyField(User, backref='tweets', on_delete='cascade')
    content = TextField()
    class Meta:
        database = db

db.execute_sql('pragma foreign_keys=0')
db.create_tables([User, Tweet])

u1 = User.create(username='u1')
u2 = User.create(username='u2')
Tweet.create(user=u1, content='u1-t1')
Tweet.create(user=u2, content='u2-t1')

invalid_user = User(username='u3', id=999)
Tweet.create(user=invalid_user, content='invalid-user')

# Deleting a user will not delete the referenced tweets.
User.delete().where(User.username == 'u1').execute()
assert Tweet.select().count() == 3

db.execute_sql('pragma foreign_keys=1')

User.delete().where(User.username == 'u2').execute()
assert Tweet.select().count() == 2

try:
    Tweet.create(user=invalid_user, content='this fails')
except IntegrityError:
    pass
else:
    assert False, 'should not be able to create invalid fk ref'
```
Hi,

I teach a Python class in which we use Peewee for implementing SQL databases in Python, given how straightforward it is to use.

One of my students recently pointed out that the foreign key constraints in one of the class examples were not working.

How to reproduce:

1. Run _personjob_learning_v3_p1.py_: Initializes the database with _person_ and _job_ tables. Populates the _person_ table.

2. Run _personjob_learning_v5_p1.py_: Populates the _job_ table.

3. Run _personjob_learning_v5_p5.py_: Deletes _person_ "Andrew" from the _person_ table, which should fail since there are entries with "Andrew" as a foreign key in the _job_ table. However, the deletion goes through.

The code uses this line to activate foreign key constraints after every _database.connect()_:

`database.execute_sql('PRAGMA foreign_keys = 1;')`

I think the command above no longer works. A workaround is replacing the line above in _person_model.py_ (line 22) with the following:

`database.pragma('foreign_keys', 1, permanent=True)`

I'm selecting _permanent=True_ so that I only need to make the change there, otherwise it needs to be made after every _database.connect()_

[peewee_issue_example.zip](https://github.com/coleifer/peewee/files/4396687/peewee_issue_example.zip)

Regards,

Luis
