Schema keyword and SQLite
A lot of people like to use SQLite as a peer for PostgreSQL for local development.
However, I think this approach is not always guaranteed to work, and as much as I love SQLite, PostgreSQL has tons of other features to offer.
So, my question is: if your production code is running with the latter, why are you not simply developing against it? It's easy enough to start a docker container with PostgreSQL locally even on non Linux machines (Mac and Windows ...). This kind of namespacing works differently in sqlite than postgres. To utilize the additional layers of nampespaces in sqlite, you need to use separate database files and then load them into your main database via "attach". When you attach a database, you specify it's nampespace, which corresponds to the "schema" setting on the model metadata.

http://docs.peewee-orm.com/en/latest/peewee/api.html#SqliteDatabase.attach You can make a custom metadata class implementation that has a dynamic schema. This should give you an idea of how to go about it:

http://docs.peewee-orm.com/en/latest/peewee/database.html#thread-safety-and-multiple-databases Hi @coleifer, thanks for the details, this is perfect for my use case!
Hi,

I am using the `schema` keyword in my models to store the resulting tables in different PostgreSQL schemas. Typical example is:

```python
database_proxy = peewee.DatabaseProxy()


class Stock(peewee.Model):
    class Meta:
        database = database_proxy
        schema = 'financial-data'

    symbol = peewee.CharField(max_length=10, primary_key=True)
    name = peewee.CharField(max_length=255)
```

I also need this code to support SQLite (in a degraded way) to help quick development / deployment. Currently, if ran against a `database_proxy.initialize('sqlite:///data.db')`, I get the following `OperationalError`:

```
peewee.OperationalError: unknown database "financial-data"
```

Is it expected that the `schema` keyword break in this way with an SQLite database? Is it possible to have a dynamic `schema` keyword to remove it when using an SQLite backend?

Thanks!