aboutsummaryrefslogtreecommitdiffstats
path: root/db/schema.rb
diff options
context:
space:
mode:
authorTeddy Wing2017-11-24 19:18:25 +0100
committerTeddy Wing2017-12-06 15:30:58 +0100
commit5ae238936d3c91e70709c2ec4ed8a73a6f4524dc (patch)
tree693481c2b4085695e5c4382031025cac7f1b6802 /db/schema.rb
parent0ec72aa1ce6598f48943df33827a6d700ee15153 (diff)
downloadchouette-core-5ae238936d3c91e70709c2ec4ed8a73a6f4524dc.tar.bz2
Referential: Move `create_schema` to an `after_commit`
The goal being to separate the creation of the database schema from the creation of the `Referential` object. Previously these were created in the same database transaction, but moving the schema to an `after_commit` puts it in a separate transaction. This change tries to mitigate a problem where two `Referential`s, created at the same time with the same data, can be saved, even though identical `Referential`s should not be allowed. By moving the schema creation to a separate transaction, we decrease the time it takes to create a `Referential`, increasing the odds of not creating two identical `Referential`s due to near-simultaneous writes. Refs #5024 Conflicts: app/models/referential.rb
Diffstat (limited to 'db/schema.rb')
0 files changed, 0 insertions, 0 deletions