GithubHelp home page GithubHelp logo

how to init a new database about aerich HOT 3 CLOSED

neo-f avatar neo-f commented on August 26, 2024
how to init a new database

from aerich.

Comments (3)

long2ice avatar long2ice commented on August 26, 2024

先执行aerich init再执行aerich init-db,或者删除migrations/models目录再执行init-db

from aerich.

lucekdudek avatar lucekdudek commented on August 26, 2024

Hi, I have the same issue. I wish I am able to apply migrations generated in local environment and then apply them to new instance of DB server from migrations files. Right now aerich init-db make two things: 1) generates migrations files, 2) apply them to DB. In my opinion user of this repository should be able to generate migrations without DB and then applying migrations to DB in which relation "aerich" does not exist.

Quick fix for this would be to change aerich upgrade so it creates relation "aerich" if not exist but a more welcome change would be to allow migration generation without live DB.

from aerich.

long2ice avatar long2ice commented on August 26, 2024

Fixed in 6339dc8

from aerich.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.