goliatone / menagerie

Manage things... all the things
0 stars 1 forks source link

Device: uuid needs to be unique #21

Open goliatone opened 8 years ago

goliatone commented 8 years ago

Fix Device.uuid definition. Currently:

uuid: {
    type: 'string',
    // primaryKey: true,
    required: true
},

Needs to be:

uuid: {
    uuidv4: true,        
    unique: true,
    index: true,
    defaultsTo: function(){ return BaseModel._uuidGenerator().toUpperCase();},
    required: true
},

Also, we need to figure out #19 and see if we can make it the primary key.

goliatone commented 8 years ago

Note that the uuidv4: true constrain could be too demanding. Some- many- client libraries are not v4 compliant.