Coder Social home page Coder Social logo

Comments (4)

briri avatar briri commented on May 30, 2024 1

I still think we should do this just to clean up the migrations directory. A user cannot run rake db:migrate from a clean installation without encountering errors. It should be fairly easy to convert the the current schema.rb over to a migration file. @jollopre @vyruss and @xsrust what do you think?

from roadmap.

briri avatar briri commented on May 30, 2024

Started working on this but it makes sense to wait until after the DB refactor. Work was done in a branch on CDLUC3/roadmap

from roadmap.

Yu-Chieh-Henry-Yang avatar Yu-Chieh-Henry-Yang commented on May 30, 2024

I'm doing a project that use DMP Roadmap and we need to have database pass migration before going to production. Does anyone have an estimate about when the database consolidation this ticket mention will be finished?

Also, I provide a possible temporary workaround here: #1774 but I'm not sure if it breaks anything

@briri

from roadmap.

Bodacious avatar Bodacious commented on May 30, 2024

@briri @xsrust @Yu-Chieh-Henry-Yang This should not be necessary. The schema file (db/schema.rb) is a single migration that reflects the current DB structure. Creating a new, single migration would simply be a duplicate of the schema file.

The following rake tasks should be useful for almost all of the issues devs are likely to come across:

rake db:migrate should only be necessary when you have an existing DB that has fallen behind the schema at HEAD. If there are issues preventing those migrations from running, these should be added as issues with the bug label.

rake db:reset          # Drop DB, create DB again, and load the schema to the current version
rake db:schema:load    # Load a schema.rb file into the database
rake db:create         # Creates the database from DATABASE_URL or config/database.yml for the current RAILS_ENV 
rake db:seed           # Load the seed data from db/seeds.rb (ONLY FOR DEVELOPMENT)
rake db:setup          # Create the database, load the schema, and initialize with the seed data (use db:reset to also drop the database first)
rake db:drop           # Drops the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:drop:all to drop all databases in the ...
rake db:migrate:status # Display status of migrations
rake db:rollback       # Rolls the schema back to the previous version (specify steps w/ STEP=n)

from roadmap.

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.