Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
commit 9f5ad77960f00a5cbbc1170e4266d90288dbeafc Author: Bohuslav Kabrda bkabrda@redhat.com Date: Fri Feb 1 12:30:18 2013 +0100
Only update existing coprs using ts_vector for postgresql
.../versions/3a035889852c_add_copr_fulltext.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/coprs_frontend/alembic/versions/3a035889852c_add_copr_fulltext.py b/coprs_frontend/alembic/versions/3a035889852c_add_copr_fulltext.py index ac0c71a..c7292ff 100644 --- a/coprs_frontend/alembic/versions/3a035889852c_add_copr_fulltext.py +++ b/coprs_frontend/alembic/versions/3a035889852c_add_copr_fulltext.py @@ -22,10 +22,10 @@ def upgrade():
session = sa.orm.sessionmaker(bind=op.get_bind())() metadata = sa.MetaData() - op.execute("UPDATE copr \ - SET copr_ts_col = to_tsvector('pg_catalog.english', coalesce(name, '') || ' ' || \ - coalesce(description, '') || ' ' || coalesce(instructions, ''))") if op.get_bind().dialect.name == 'postgresql': + op.execute("UPDATE copr \ + SET copr_ts_col = to_tsvector('pg_catalog.english', coalesce(name, '') || ' ' || \ + coalesce(description, '') || ' ' || coalesce(instructions, ''))") # no need to coalesce here, the trigger doesn't need it op.execute("CREATE TRIGGER copr_ts_update BEFORE INSERT OR UPDATE \ ON copr \
copr-devel@lists.fedorahosted.org