Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
clickhouse:
image: 'clickhouse/clickhouse-server:${CLICKHOUSE_VERSION}'
image: 'clickhouse/clickhouse-server:${CLICKHOUSE_VERSION:-25.10}'
container_name: 'clickhouse-activerecord-clickhouse-server'
ports:
- '18123:8123'
Expand Down
2 changes: 2 additions & 0 deletions bin/test-single
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ set -euo pipefail

export CLICKHOUSE_PORT="${CLICKHOUSE_PORT:-18123}"
export CLICKHOUSE_DATABASE="${CLICKHOUSE_DATABASE:-default}"
export CLICKHOUSE_USER="${CLICKHOUSE_USER:-test}"
export CLICKHOUSE_PASSWORD="${CLICKHOUSE_PASSWORD:-test}"

exec bundle exec rspec spec/single --format progress "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
class ModifySomeTable < ActiveRecord::Migration[7.1]
def up
add_column :some, :new_column, :big_integer
add_column :some, :new_uint16, :integer, limit: 2, unsigned: true
end
end

4 changes: 3 additions & 1 deletion spec/single/migration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,15 @@

current_schema = schema(model)

expect(current_schema.keys.count).to eq(3)
expect(current_schema.keys.count).to eq(4)
expect(current_schema).to have_key('id')
expect(current_schema).to have_key('date')
expect(current_schema).to have_key('new_column')
expect(current_schema).to have_key('new_uint16')
expect(current_schema['id'].sql_type).to eq('UInt32')
expect(current_schema['date'].sql_type).to eq('Date')
expect(current_schema['new_column'].sql_type).to eq('Nullable(UInt64)')
expect(current_schema['new_uint16'].sql_type).to eq('Nullable(UInt16)')
end
end

Expand Down
Loading