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

Already on GitHub? Sign in to your account

temporary tables match "^lhm[noc]_" #7

Merged
merged 1 commit into from Sep 20, 2011

Conversation

Projects
None yet
2 participants
Contributor

purzelrakete commented Sep 16, 2011

No description provided.

@rngtng rngtng commented on the diff Sep 16, 2011

lib/large_hadron_migration.rb
@@ -100,9 +100,10 @@ class LargeHadronMigration < ActiveRecord::Migration
raise "chunk_size must be >= 1" unless chunk_size >= 1
- new_table = "new_#{curr_table}"
- old_table = "%s_#{curr_table}" % Time.now.strftime("%Y_%m_%d_%H_%M_%S_%3N")
- journal_table = "#{old_table}_changes"
+ started = Time.now.strftime("%Y_%m_%d_%H_%M_%S_%3N")
+ new_table = "lhmn_#{curr_table}"
+ old_table = "lhmo_%s_#{curr_table}" % started
+ journal_table = "lhmc_%s_#{curr_table}" % started
@rngtng

rngtng Sep 16, 2011

Contributor

lhmc - what does 'c' stand for? changes? then var name `journal_table' better should reflect this as well?

@purzelrakete

purzelrakete Sep 16, 2011

Contributor

yup - nEW, oLD, cHANGES.

r

On Sep 16, 2011, at 10:14 , Tobias Bielohlawek wrote:

@@ -100,9 +100,10 @@ class LargeHadronMigration < ActiveRecord::Migration

raise "chunk_size must be >= 1" unless chunk_size >= 1
  • new_table = "new_#{curr_table}"
  • old_table = "%s_#{curr_table}" % Time.now.strftime("%Y_%m_%d_%H_%M_%S_%3N")
  • journal_table = "#{old_table}_changes"
  • started = Time.now.strftime("%Y_%m_%d_%H_%M_%S_%3N")
  • new_table = "lhmn_#{curr_table}"
  • old_table = "lhmo_%s_#{curr_table}" % started
  • journal_table = "lhmc_%s_#{curr_table}" % started

lhmc - what does 'c' stand for? changes?

Reply to this email directly or view it on GitHub:
https://github.com/soundcloud/large-hadron-migrator/pull/7/files#r128093

@rngtng rngtng merged this pull request into master Sep 20, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment