octopus icon indicating copy to clipboard operation
octopus copied to clipboard

Old project, migrations starting from first migration

Open maxrails opened this issue 10 years ago • 5 comments

Hi, I'm using Rails 3.2.13 and application is rather old and huge. I installed octopus gem in gemfile:(gem 'ar-octopus', :git => 'https://github.com/tchandy/octopus.git') - set up schards.yml

octopus:
  fully_replicated: false
  verify_connection: true
  environments:
    - development
    - test
  development:
    slave1:
      adapter: mysql2
      encoding: utf8
      reconnect: false
      database: ns_dev_replica
      pool: 10
      username: root
      socket: /tmp/mysql.sock
      host: 127.0.0.1
  test:
    slave1:
      adapter: mysql2
      encoding: utf8
      reconnect: false
      database: ns_dev_replica_test
      pool: 10
      username: root
      socket: /tmp/mysql.sock
      host: 127.0.0.1

then bundle exec rake octopus:copy_schema_versions It start working correctly for select queries( tested in console ) but then I tried bundle exec rake db:migrate - and it started migrations from the beginning of my migrations. - and of course it breaks as master and slave already got all fields and tables. Is there way to pass schema version to octopus - so migrations will start not from the beginning ?

maxrails avatar Nov 17 '14 18:11 maxrails

I also encountered this problem.

yukihariguchi avatar Nov 28 '14 14:11 yukihariguchi

+1

england avatar Sep 01 '15 12:09 england

+1

nsi88 avatar Sep 01 '15 12:09 nsi88

+1

ashish198907 avatar Sep 02 '16 10:09 ashish198907

Same problem here, any news?

knightq avatar Sep 14 '17 13:09 knightq