Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SQLite as supported database #226

Merged
merged 9 commits into from
Oct 6, 2018
Merged

Add SQLite as supported database #226

merged 9 commits into from
Oct 6, 2018

Conversation

igalic
Copy link
Contributor

@igalic igalic commented Sep 15, 2018

Extend Plume, or rather, its use of Diesel to support SQLite

@igalic
Copy link
Contributor Author

igalic commented Sep 15, 2018

n.b.: this is a work in progress for #93

@elegaanz elegaanz added C: Feature This is a new feature S: Incomplete This PR is not complete yet A: Backend Code running on the server labels Sep 15, 2018
plume-models/src/blogs.rs Show resolved Hide resolved
plume-models/src/blogs.rs Show resolved Hide resolved
plume-models/src/lib.rs Show resolved Hide resolved
@igalic
Copy link
Contributor Author

igalic commented Sep 28, 2018

So far so good!

setup.rs is still a little irritating

building it — correctly — feels irritating. i'd much rather setup.rs be able to deal with both postgres & sqlite built-in at the same time.

@elegaanz elegaanz added S: Ready for review This PR is ready to be reviewed and removed S: Incomplete This PR is not complete yet labels Sep 29, 2018
igalic and others added 9 commits September 30, 2018 14:13
we move our PostgreSQL specific migrations to a subdirectory.
The SQLite migrations have been created by running `diesel` against a
copy, and then fixing what's broken.
In the end i reduced all modifications to a single create, since we
*are* starting out fresh with SQLite.

n.b.: i'm not entirely happy with the results yet, because diesel
heavily modifies our `plume-models/src/schema.rs`.
I'll keep fiddling until we have the same types between the two
databases.
use DATETIME for SQLite's time type. This way, Diesel picks up on what
it's supposed to be.
this one's achieved by adding "NOT NULL" at the *correct* position in
SQLite's create tables.
@elegaanz elegaanz merged commit b464671 into Plume-org:master Oct 6, 2018
@igalic igalic deleted the feat/sqlite branch October 6, 2018 11:24
@igalic igalic mentioned this pull request Oct 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Backend Code running on the server C: Feature This is a new feature S: Ready for review This PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants