Method: RR::ReplicationInitializer#create_event_log
- Defined in:
- lib/rubyrep/replication_initializer.rb
#create_event_log ⇒ Object
Creates the replication log table.
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/rubyrep/replication_initializer.rb', line 150 def create_event_log silence_ddl_notices(:left) do table_name = "#{[:rep_prefix]}_logged_events" session.left.create_table "#{[:rep_prefix]}_logged_events" session.left.add_column table_name, :activity, :string session.left.add_column table_name, :change_table, :string session.left.add_column table_name, :diff_type, :string session.left.add_column table_name, :change_key, :string session.left.add_column table_name, :left_change_type, :string session.left.add_column table_name, :right_change_type, :string session.left.add_column table_name, :description, :string, :limit => DESCRIPTION_SIZE session.left.add_column table_name, :long_description, :string, :limit => LONG_DESCRIPTION_SIZE session.left.add_column table_name, :event_time, :timestamp session.left.add_column table_name, :diff_dump, :string, :limit => DIFF_DUMP_SIZE session.left.remove_column table_name, 'id' session.left.add_big_primary_key table_name, 'id' end end |