Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Custom Types for Lists #73

Open
gabosgab opened this issue Jan 18, 2016 · 1 comment
Open

Support Custom Types for Lists #73

gabosgab opened this issue Jan 18, 2016 · 1 comment

Comments

@gabosgab
Copy link

Currently, it looks like the create_table action does not support custom types.

Schema

execute('DROP TYPE IF EXISTS action');
    execute('
      CREATE TYPE
       action(
        created_at timestamp,
        secondary_entity_id int,
        action_id int,
        verb_id int
       );
    ')

    create_table :activities,
               partition_keys: [:user_id, :created_at, :entity_id],
               primary_keys:   [:user_id, :created_at, :entity_id] do |t|
      t.integer   :created_at
      t.integer   :user_id
      t.integer   :entity_id
      t.list      :actions, :type => 'action'
    end

Migration Error

CassandraMigrations::Errors::MigrationDefinitionError: Type 'action' is not valid for cassandra migration.
/Users/gabe/.rvm/gems/ruby-2.2.1/gems/cassandra_migrations-0.2.5/lib/cassandra_migrations/migration/table_definition.rb:290:in list_or_set' /Users/gabe/.rvm/gems/ruby-2.2.1/gems/cassandra_migrations-0.2.5/lib/cassandra_migrations/migration/table_definition.rb:166:inlist'
/Users/gabe/src/stolenapi/db/cassandra_migrate/20160118193215_activty_feed.rb:21:in `block in up'

@ckhall
Copy link

ckhall commented Jan 22, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants