Skip to content

Commit

Permalink
modif commentaires anglais autoincrémentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliettejns committed Mar 6, 2024
1 parent 75c04d5 commit dbeef55
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/db_fixtures/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def add_control_lists(
cl = copy.deepcopy(DB_CORPORA[corpus]["control_list"])
db.session.add(cl)
db.session.commit()
# lorsque l'on force un exemple avec id l'autoincrémentation des id dans postgresql ne fonctionne pas par la suite.
# When we use prefilled ID values, PSQL engines do not update their autoincrement "registry"
# (for the lack of a better word). This results in future insertion to raise errors, because ID 1 or ID 2 are already used.
if db.engine.dialect.name == "postgresql":
db.session.execute(
text("""SELECT setval(
Expand Down Expand Up @@ -137,7 +138,8 @@ def add_corpus(

db.session.add(corpus_object)
db.session.flush()
# lorsque l'on force un exemple avec id l'autoincrémentation des id dans postgresql ne fonctionne pas par la suite.
# When we use prefilled ID values, PSQL engines do not update their autoincrement "registry"
# (for the lack of a better word). This results in future insertion to raise errors, because ID 1 or ID 2 are already used.
if db.engine.dialect.name == "postgresql":
db.session.execute(
text("""SELECT setval(
Expand Down

0 comments on commit dbeef55

Please sign in to comment.