Closed immannino closed 4 months ago
I've kinda regretted adding the Setup function. Usually it just makes more sense to run the schema code in whatever schema migration people are already using, so I think I'll remove it soon. In the meantime, I would suggest not calling Setup but copying the schema from the repo. 🙂
Thanks for the reply! I think the utility is great for getting up and running, but I agree as migrating into an existing project / group that makes sense as an ongoing process.
Hi!
I've been using this library all morning and it is fantastic. I just wanted to pose this more as a question or usability suggestion. For most of my sqlite projects I initialize all my tables as
CREATE TABLE IF NOT EXISTS
and run my ddl on setup for my apps.Currently using the library I have to comment out
goqite.Setup()
after the first run otherwise it fails since the table already exists. Would you be open to changing the default schema toCREATE TABLE IF NOT EXISTS
or is there a preferred pattern / just catching and checking the error is for the 'table already exists' error and moving on?Thanks!