Core\Db\Schema
Describes the tables a database should have. You can compare it with a real database and apply the changes that make them match.
Members
5 members.
| Member | Signature |
|---|---|
fromArray | fromArray(array<mixed> $array): Core\Db\Schema |
toArray | toArray(): array<mixed> |
planAgainst | planAgainst(Core\Db\Connection $connection): Core\Db\Plan |
applySafe | applySafe(Core\Db\Connection $connection): void |
applyIncludingRisky | applyIncludingRisky(Core\Db\Connection $connection): void |
Example apps
These complete apps use this class. You can download and run each one.
- Chat: A chat app with rooms, WebSockets and SQLite. One Novis server sends the pages and runs every connection, with no separate WebSocket server and no library.
- Notes: A small notes app with SQLite, HTML pages, a JSON API, form checks and tests. Download it, run it and start your own app from it.
- Poll: A live poll with SQLite and server-sent events. Every open page shows each new vote at once, with no extra server and no library.
