Sha256: 27457898210fb6cfd735e19c7b94eca20be3efbfbb1502264f2398b043354a95

Contents?: true

Size: 208 Bytes

Versions: 10

Compression:

Stored size: 208 Bytes

Contents

module RC
  module PrimaryKey
    def add_primary_key(table, options = {})
      attribute = "id".to_sym
      sql = "ALTER TABLE #{table} ADD PRIMARY KEY (#{attribute})"
      execute(sql)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rein-0.8.3 lib/rein/constraint/primary_key.rb
rein-0.8.2 lib/rein/constraint/primary_key.rb
rein-0.8.1 lib/rein/constraint/primary_key.rb
rein-0.8.0 lib/rein/constraint/primary_key.rb
rein-0.7.1 lib/rein/constraint/primary_key.rb
rein-0.7.0 lib/rein/constraint/primary_key.rb
rein-0.6.0 lib/rein/constraint/primary_key.rb
rein-0.5.2 lib/rein/constraint/primary_key.rb
rein-0.5.1 lib/rein/constraint/primary_key.rb
rein-0.5.0 lib/rein/constraint/primary_key.rb