Sha256: 725d7ad94c208b62fd79d5de7ae7246f3e1717b173e105da5bbbd118cefa88bd

Contents?: true

Size: 441 Bytes

Versions: 5

Compression:

Stored size: 441 Bytes

Contents

# frozen_string_literal: true

module PGTrunk
  # @private
  # The module makes `pg_trunk` gem-specific registry
  # to be created and dropped along with the native schema.
  module SchemaMigration
    extend ActiveSupport::Concern

    class_methods do
      def create_table
        super
        PGTrunk::Registry.create_table
      end

      def drop_table
        PGTrunk::Registry.drop_table
        super
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pg_trunk-0.2.0 lib/pg_trunk/core/railtie/schema_migration.rb
pg_trunk-0.1.3 lib/pg_trunk/core/railtie/schema_migration.rb
pg_trunk-0.1.2 lib/pg_trunk/core/railtie/schema_migration.rb
pg_trunk-0.1.1 lib/pg_trunk/core/railtie/schema_migration.rb
pg_trunk-0.1.0 lib/pg_trunk/core/railtie/schema_migration.rb