sourcefuse / loopback4-starter

Loopback 4 starter application. Multi-tenant architecture supported. Authentication, Authorization, Soft deletes, environment vars, Audit logs, included.
MIT License
161 stars 61 forks source link

Update 20190502110035-seed-script-up.sql #24

Open sherif2011 opened 5 years ago

sherif2011 commented 5 years ago

Description

Please remove ids from all your seeds inserts, since you are using sequences, if you insert with explicit ids, you are not using the sequence. Later when you call the post api it will through a pk uniqueness violations.

Type of change

Please delete options that are not relevant.

How Has This Been Tested ?

If you try posting a role for the first few times (exactly 3 times) it will fail throwing a primary key violation. After the fix, post request works fine from first attempt. BTW I haven't test others, but I am assuming the same behavior will occur before the fix, since you are using sequence for tenants and users.