Giter Club home page Giter Club logo

blueshift's People

Contributors

bradrobertson avatar sachinsiby avatar

Stargazers

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

Watchers

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

blueshift's Issues

Blueshift requires dotenv but doesn't know about environments

Right now I'd have to have a .env file in order for blueshift to setup my test database. Running RAILS_ENV=test rake pg:schema:load won't actually do anything against my test db as blueshift, nor dotenv doesn't know about Rails, nor should they.

`rake redshift:schema:dump` doesn't work

I get this error:

rake aborted!
Sequel::DatabaseError: PG::UndefinedColumn: ERROR:  column "name" does not exist
LINE 1: ...ttribute"."attnotnull" AS "allow_null", COALESCE(("name" = '...
                                                             ^

redshift schema dumping failing

± br |br/group_contact_company_id ✓| → rake redshift:schema:dump
rake aborted!
Sequel::DatabaseError: PG::UndefinedColumn: ERROR: column "name" does not exist
LINE 1: ...ttribute"."attnotnull" AS "allow_null", COALESCE(("name" = '...
^
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/adapters/postgres.rb:186:in async_exec' /Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/adapters/postgres.rb:186:inblock in execute_query'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/database/logging.rb:48:in log_connection_yield' /Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/adapters/postgres.rb:186:inexecute_query'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/adapters/postgres.rb:173:in block in execute' /Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/adapters/postgres.rb:149:incheck_disconnect_errors'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/adapters/postgres.rb:173:in execute' /Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/adapters/postgres.rb:525:in_execute'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/adapters/postgres.rb:341:in block (2 levels) in execute' /Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/adapters/postgres.rb:546:incheck_database_errors'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/adapters/postgres.rb:341:in block in execute' /Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/database/connecting.rb:251:inblock in synchronize'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/connection_pool/threaded.rb:105:in hold' /Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/database/connecting.rb:251:insynchronize'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/adapters/postgres.rb:341:in execute' /Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/actions.rb:970:inexecute'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/adapters/postgres.rb:669:in fetch_rows' /Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/actions.rb:141:ineach'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/actions.rb:392:in map' /Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/actions.rb:392:inmap'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/blue-shift-0.3.1/lib/sequel/adapters/redshift.rb:109:in schema_parse_table' /Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/database/query.rb:161:inschema'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/extensions/schema_dumper.rb:246:in dump_table_generator' /Users/dev/.rvm/gems/ruby-2.3.0/gems/blue-shift-0.3.1/lib/sequel/extensions/redshift_schema_dumper.rb:10:indump_table_schema'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/extensions/schema_dumper.rb:138:in block in dump_schema_migration' /Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/extensions/schema_dumper.rb:138:inmap'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/extensions/schema_dumper.rb:138:in dump_schema_migration' /Users/dev/.rvm/gems/ruby-2.3.0/gems/blue-shift-0.3.1/lib/tasks/schema.rake:51:inblock (4 levels) in <top (required)>'
/Users/dev/.rvm/gems/ruby-2.3.0/gems/blue-shift-0.3.1/lib/tasks/schema.rake:51:in open' /Users/dev/.rvm/gems/ruby-2.3.0/gems/blue-shift-0.3.1/lib/tasks/schema.rake:51:inblock (3 levels) in <top (required)>'
/Users/dev/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in eval' /Users/dev/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in

'
PG::UndefinedColumn: ERROR: column "name" does not exist
LINE 1: ...ttribute"."attnotnull" AS "allow_null", COALESCE(("name" = '...

Migration code breaks dev if env vars aren't present

This line will break in development (the app won't even load) if you don't have these env vars set.

This shouldn't be required to just start the app in development mode. One thought is to lazily load the connections, but these should be thread safe as doing a

def self.redshift_db
  @redshift_db ||= Sequel.connect()
end

is NOT thread safe. Perhaps assign them to a thread local var.

Allow for null uuids

Right now Suuid type assumes NOT NULL. This means I can't add new columns, backfill, and later make NOT NULL

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.