comparison roundup/backends/back_postgresql.py @ 7715:95f0002e85c4

fix: remove 'public' schema from __words table in fix_version_3_tables If you are using a different schema than public, fix_version_3_tables crashes on the migration/setup. Nothing else n the postgresql code uses an explicit public schema. This removes an impediment for those wanting to use schemas rather than databases as the primary organizational structure. See: issue2551299 Also see: issue2550852 for code to allow use of schemas as a first class config parameter.
author John Rouillard <rouilj@ieee.org>
date Mon, 18 Dec 2023 20:20:15 -0500
parents b41750bf9f03
children 0ccc6d3ba9f2
comparison
equal deleted inserted replaced
7714:b41750bf9f03 7715:95f0002e85c4
379 self.sql('CREATE INDEX %ss_key_idx ON %ss(%s_key)' % (name, name, 379 self.sql('CREATE INDEX %ss_key_idx ON %ss(%s_key)' % (name, name,
380 name)) 380 name))
381 381
382 def fix_version_3_tables(self): 382 def fix_version_3_tables(self):
383 rdbms_common.Database.fix_version_3_tables(self) 383 rdbms_common.Database.fix_version_3_tables(self)
384 self.sql('''CREATE INDEX words_both_idx ON public.__words 384 self.sql('''CREATE INDEX words_both_idx ON __words
385 USING btree (_word, _textid)''') 385 USING btree (_word, _textid)''')
386 386
387 def _add_fts_table(self): 387 def _add_fts_table(self):
388 self.sql( 388 self.sql(
389 'CREATE TABLE __fts (_class VARCHAR(255), ' 389 'CREATE TABLE __fts (_class VARCHAR(255), '

Roundup Issue Tracker: http://roundup-tracker.org/