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

Seed data #32

Open
maghoff opened this issue Oct 30, 2017 · 2 comments
Open

Seed data #32

maghoff opened this issue Oct 30, 2017 · 2 comments
Labels

Comments

@maghoff
Copy link
Owner

maghoff commented Oct 30, 2017

For an improved development experience, there should be some seed data.

Complication: Diesel doesn't have any support for this at all. I would have to build it myself.

@maghoff maghoff added the dev label Oct 30, 2017
@killercup
Copy link

I'd be interested in a good solution for seeding data in an app that uses Diesel as well, but I don't think it's something that Diesel itself should do. SQLite supports importing CSV files, but I guess that might be too cumbersome.

I'd probably use serde-yaml and a bunch of #[derive(Insertable, Deserialize)].

@maghoff
Copy link
Owner Author

maghoff commented Dec 2, 2017

If Diesel would be handling this, I would imagine it would be in diesel-cli, not affecting the library.

However, after I added FTS, diesel-cli cannot even run the migrations; it links with a version of libsqlite3 which doesn't include FTS5 (on my system). Considering that, it might be unrealistic to expect diesel-cli to be able to handle seed data for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants