Drop support for SQLite < 3.7

Both Ubuntu 18.04 [1] and CentOS 8 [2] provide sufficiently new versions
of SQLite that make this check unnecessary now.

[1] https://packages.ubuntu.com/bionic/sqlite3
[2] http://mirror.centos.org/centos/7/os/x86_64/Packages/

Change-Id: I49fec5b9521f292df38c54bf5ddcb993d2e13d5c
This commit is contained in:
dengzhaosen 2021-04-30 10:17:15 +08:00 committed by Jorhson Deng
parent faf44b54dc
commit 6185e66056

@ -3583,12 +3583,6 @@ class PurgeDeletedTest(test.TestCase):
return timeutils.utcnow() - datetime.timedelta(
days=random.randint(begin, end))
def _sqlite_has_fk_constraint(self):
# SQLAlchemy doesn't support it at all with < SQLite 3.6.19
import sqlite3
tup = sqlite3.sqlite_version_info
return tup[0] > 3 or (tup[0] == 3 and tup[1] >= 7)
def _turn_on_foreign_key(self):
engine = db_api.get_engine()
connection = engine.raw_connection()
@ -3671,9 +3665,6 @@ class PurgeDeletedTest(test.TestCase):
age_in_days=-1)
def test_purge_records_with_constraint(self):
if not self._sqlite_has_fk_constraint():
self.skipTest(
'sqlite is too old for reliable SQLA foreign_keys')
self._turn_on_foreign_key()
type_id = uuidutils.generate_uuid()
# create share type1