GithubHelp home page GithubHelp logo

core's People

Contributors

7even avatar gitter-badger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

gitter-badger

core's Issues

RENAME INDEX in conditional migrations

Postgres allows renaming indexes, and while it is impossible to use inside the schema diffing algorithm (as indexes are compared by name) it can still be used inside conditional migrations.

Adding an Operations::RenameIndex (and respective rename_index in the Migrator) and handling it with execute('ALTER INDEX name RENAME TO new_name') in the Reader should do it.

Runner#alter_enum_values fails on check constraints using enums

If the database schema contains any check constraints that mention an enum field, then running AlterEnumValues against that enum type fails.

A possible solution would be to drop check constraints before recreating the enum and create them back afterwards.

Cloud FIrestore support

Cloud Firestore is a very popular and useful database. It would be nice if you include it

Enum values changing

Hello!

I like your idea and I want to help.

Reordering and deleting values from enum types is not supported.

You can do it!

Sequel migration example:

Sequel.migration do
  no_transaction

  up do
    add_enum_value(:enum_locale, 'fr')
  end

  down do
    enum_values = schema(:users).to_h[:locale][:enum_values]

    alter_table :users do
      set_column_type :locale, String
    end

    self[:users].where(locale: 'fr').update(locale: 'en')

    drop_enum :enum_locale
    create_enum :enum_locale, enum_values - %w(fr)

    alter_table table do
      set_column_type(
        :locale,
        :enum_locale,
        using: 'locale::enum_locale'
      )
    end
  end
end

Normalizer may require extensions & enums

A temporary table created in Normalizer can depend on enums and/or extensions that may not exist yet (for example when applying the schema to an empty database).

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.