Sha256: e79ece1f5b098b0c73ae3a01b01ff59974f09daa42c65fca29c5c543ca28ca48
Contents?: true
Size: 849 Bytes
Versions: 2
Compression:
Stored size: 849 Bytes
Contents
module DmPanlex class Cu include DataMapper::Resource storage_names[:default] = 'cu' #DataMapper requires a primary Key. It's not present in Panlex original database, but we assume it's the :cu_c0_key unique index. In MySQL a 'Text' field can't be a PK, so we change 'loc' and 'vb' to be 'String' property :lv, Integer, :key => true, :required => true, :unique_index => [:cu_c0_key, :cu_c1_key] property :c0, String, :length => 5, :key => true, :required => true, :unique_index => :cu_c0_key property :c1, String, :length => 5, :required => true, :unique_index => :cu_c1_key property :loc, String, :length => 255, :key => true, :unique_index => [:cu_c0_key, :cu_c1_key] property :vb, String, :length => 255, :key => true, :required => true, :unique_index => [:cu_c0_key, :cu_c1_key] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dm_panlex-0.2.2 | lib/dm_panlex/models/cu.rb |
dm_panlex-0.2.1 | lib/dm_panlex/models/cu.rb |