PhilWaldmann / openrecord

Make ORMs great again!
https://openrecord.js.org
MIT License
486 stars 38 forks source link

Fix UUID issue #49

Closed SampsonCrowley closed 7 years ago

SampsonCrowley commented 7 years ago

Fixed an issue where a default value regex test /-?\d+/ was matching against uuid_generate_v1() and uuid_generate_v4()

added test to confirm null default on UUID default columns

probably could still use a validation to confirm UUID but i don't think thats vital right now

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.03%) to 90.333% when pulling 54911696c3818b8e6c522bbe191f12553bf3e5bd on SampsonCrowley:master into 5e7c692cf0cdce3605f0ea2b44a8f2152dab379e on PhilWaldmann:master.

PhilWaldmann commented 7 years ago

Hey! Thanks!!

Oh, the 1 comes from the ..._v1.

Could you please add the newly added uuid type to the simplifiedType method of attributes.js. Otherwiese Openrecord will use the string type for uuid.

so that this

it('attribute id is type uuid', function(next){
    store.ready(function(){
      var UuidTest = store.Model('UuidTest')
      UuidTest.definition.attributes.id.type.name.should.be.equal('uuid')
      next()
    })
  })

wil pass.

Thanks, Philipp

SampsonCrowley commented 7 years ago

Done

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.01%) to 90.38% when pulling b8c32a87ce7d093eec7633f257558356235d1270 on SampsonCrowley:master into 5e7c692cf0cdce3605f0ea2b44a8f2152dab379e on PhilWaldmann:master.

SampsonCrowley commented 7 years ago

node 6 timed out. i don't think that's my fault though.. node 4 passed and tests on my local pc (node v8.1.4) all passed

SampsonCrowley commented 7 years ago

is there a way to re run the test?

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.01%) to 90.38% when pulling b8c32a87ce7d093eec7633f257558356235d1270 on SampsonCrowley:master into 5e7c692cf0cdce3605f0ea2b44a8f2152dab379e on PhilWaldmann:master.

SampsonCrowley commented 7 years ago

Well that was weird, BUT we're ready to rock and roll