clutchski / caribou Goto Github PK
View Code? Open in Web Editor NEWA small, simple Python migrations library for SQLite databases.
A small, simple Python migrations library for SQLite databases.
This is a feature request.
SQLITE does not support many of the ALTER statements we are used to in other RDBMS. It would be great if Caribou helped us do effortless ALTERs by doing the move-and-copy workaround for us. It could batch the alters together so that only a single move-and-copy would need to be executed.
I understand that I can do this today by implementing a migration that does this myself, but there may be room for Caribou to provide helper functions to make such a task less error prone / easier / more efficient, especially to those less familiar with this pattern.
I also understand if this is outside the intended scope of caribou, as it presents less "simple" and more "advanced/smart" feature beyond just the migration.
For an example of what I mean, you can check SQLAlchemy's Alembic project which implements this specifically for SQLite databases and is MIT licensed.
I'm trying to build my python app with Pyinstaller but I can't figure out how to make caribou work in the built version of the app. Caribou works fine when running the app using python app.py
since the migration directories are preserved. In the build version, all files are build into binaries, all in the same directory ... and that leads to caribou failing with
caribou.Error: /tmp/_MEI7FKrIm/app/migrations/main is not a directory.
I'm building my app in pyinstaller's single file mode.
Do you guys plan to support sqlcipher support?
to create & run migrations
for example,
with execute(self.conn, sql, [VERSION_TABLE]) as cursor:
return bool(cursor.fetchall())
is the same as:
with contextlib.closing(self.conn.execute(sql, [VERSION_TABLE]) as cursor:
return bool(cursor.fetchall())
Windows doesn't respect the #!
line in CLI on the script folder.
I suggest to make the CLI a module and then invoke with
python -m caribou create my_migration
Such that it is consistent across platform.
Will you take a PR for it?
thinking about adding support for other databases.
some thoughts:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.