Comments (3)
Yes, that's the right functionality.
Running create
generates the initial create_table
commands but it does not have the ability to detect changes in models.
If you add a column to your model, you'll need to generate a new migration and add the add_column
statement manually.
flask db revision "add content to tweet"
Then update your migration:
def upgrade(migrator):
migrator.add_column('tweet', 'content', 'text')
def downgrade(migrator):
migrator.drop_column('tweet', 'content')
from peewee-moves.
- Are there plans to implement this feature in the future?
- This software is considered complete as is?
- Or in case I can contribute to the development of this feature, will my pull request be accepted?
from peewee-moves.
I think it would be a great feature to have. I have no plans to implement it, mostly because I don't have time to dedicate to it.
I have given it much thought though. There are many different changes to a model that could take place like...
- adding a column
- removing a column
- renaming a column
- changing column data type
- changing column length
- and more...
Django and Alembic have both solved this, but using different strategies. Django keeps track of model history (it knows what your models look like before each change). I wouldn't be opposed to doing something like that, but it's definitely more complex.
Adding a column and removing a column are the easiest to detect and quite common actions, so even if it were able to do that, I think it would be helpful.
I will gladly accept pull requests for this feature (or any other feature for that matter). I don't use this library too often anymore, but if it's useful to other people I'd like to keep it alive. I'd be glad to help with development as well, I just don't have time to do it completely in any reasonable time frame.
from peewee-moves.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from peewee-moves.