lib/wyrm/schema_tools.rb
# some includers will need to provide a different implementation for this.
some includers will need to provide a different implementation for this.
some includers will need to provide a different implementation for this .
def create_indexes
      logger.info "creating indexes"
      eval( index_migration ).apply dst_db, :up
      logger.info "creating foreign keys"
      eval( fk_migration ).apply dst_db, :up
      if dst_db.database_type == :postgres
        logger.info "reset primary key sequences"
        dst_db.tables.each{|t| dst_db.reset_primary_key_sequence(t)}
        logger.info "Primary key sequences reset successfully"
      end
    end
def create_indexes logger . info "creating indexes" eval ( index_migration ) . apply dst_db , :up logger . info "creating foreign keys" eval ( fk_migration ) . apply dst_db , :up if dst_db . database_type == :postgres logger . info "reset primary key sequences" dst_db . tables . each { | t | dst_db . reset_primary_key_sequence ( t ) } logger . info "Primary key sequences reset successfully" end end
some includers will need to provide a different implementation for this.
some includers will need to provide a different implementation for this .
# create indexes and foreign keys, and reset sequences