Schema reconciliation + index hygiene, and the weekly base-image refresh #243
@@ -208,6 +208,15 @@ jobs:
|
|||||||
mkdir -p /tmp/held
|
mkdir -p /tmp/held
|
||||||
mv alembic/versions/*.py /tmp/held/
|
mv alembic/versions/*.py /tmp/held/
|
||||||
cp /tmp/candidate/*.py alembic/versions/
|
cp /tmp/candidate/*.py alembic/versions/
|
||||||
|
# Autogenerate EMITS pgvector.sqlalchemy.vector.VECTOR(...) without
|
||||||
|
# importing it, so the file it writes cannot run:
|
||||||
|
# NameError: name 'pgvector' is not defined
|
||||||
|
# Observed on run 4988, which is the proof rather than the theory.
|
||||||
|
# This is a defect in the GENERATOR, not in the models, so it is
|
||||||
|
# repaired here rather than counted as a schema difference — the
|
||||||
|
# comparison is about whether the models describe the schema.
|
||||||
|
sed -i '0,/^import sqlalchemy as sa$/s//import sqlalchemy as sa\nimport pgvector.sqlalchemy.vector/' alembic/versions/*.py
|
||||||
|
grep -n 'import pgvector' alembic/versions/*.py
|
||||||
ls alembic/versions/*.py
|
ls alembic/versions/*.py
|
||||||
DB_NAME=fc_base alembic upgrade head
|
DB_NAME=fc_base alembic upgrade head
|
||||||
rm -f alembic/versions/*.py
|
rm -f alembic/versions/*.py
|
||||||
|
|||||||
Reference in New Issue
Block a user