Changelog
=========

v5.0.2 (2026-08-11)
-------------------
+ Extensive documentation: rewritten README plus docs/ pages for
  settings, limitations, backend internals, testing and troubleshooting


v5.0.1 (2026-08-11)
-------------------
+ Add GitHub Actions CI running the suite against Firebird 3, 4, 5 and the
  6 development snapshot (official Docker images) on Python 3.11/3.12
+ Test settings honour FIREBIRD_HOST/PORT/USER/PASSWORD/DATABASE/
  DATABASE_OTHER/LOCK_TIMEOUT environment variables
+ Fix server version detection: feature gating now uses the real engine
  version instead of the leading number of the platform version string,
  which is the InterBase-lineage 6.x on every modern Firebird
+ Firebird < 6 compatibility for collations: COLLATE is placed at the end
  of column definitions as the grammar requires, plain type alters no
  longer name the (preserved) collation, and collation changes go through
  a temp-column rebuild since ALTER ... TYPE rejects COLLATE there
+ Firebird 3: DecimalField columns above the server's 18 digit precision
  limit are created clamped to 18 digits (keeping the integer digits), and
  supports_high_precision_decimals gates the affected tests
+ Gate the aware-datetimes upstream test on has_zoneinfo_database, which
  the backend does not declare yet (SQL time zone conversion is only
  partially implemented; Firebird 3 has no AT TIME ZONE at all)
+ CI installs the Firebird 5 client library from the server image; the
  distribution's Firebird 3 era libfbclient2 cannot describe the
  INT128-backed NUMERIC types returned by Firebird 4+ servers
+ Validated against Firebird 5 stable and 6 snapshot containers: the full
  suite outside the schema app passes on both; schema app hardening for
  Firebird < 6 continues (FK bookkeeping in alters, blob indexing,
  table comments)


v5.0.0 (2026-08-11)
-------------------
+ Rename python package from firebird to django_firebird to avoid the
  namespace conflict with firebird-driver #130
+ Upgrade firebird-driver to 2.x, fixing import-time TypeError with
  firebird-base 2.x #164
+ Adapt test database creation to the firebird-driver 2.x API
  (no host/port/page_size arguments; DSN plus driver_config instead)
+ Remove index_together handling from the schema editor (removed in Django 5.1)
+ Use the native BOOLEAN type for BooleanField without a check constraint;
  Firebird 3+ does not need the smallint emulation and the constraint
  triggered a Firebird 3.0.x bug when dropping columns #154
+ Modernize the test suite for Django 5.x: drop index_together and pytz
  usage, sync stale tests with upstream Django 5.2, create contrib app
  tables with sync_apps (MIGRATION_MODULES=None) so cross-app foreign keys
  resolve, and add documented skips for genuine Firebird limitations
+ Introspection fixes: preserve the case of quoted identifiers, report no
  collation for columns using the character set default, raise DatabaseError
  for missing tables, stop reporting foreign key constraints as indexes,
  and declare introspected_field_types for sequence-based auto fields
+ Fix week truncation in date/datetime trunc SQL (previous formula produced
  dates in the wrong month and shifted Sundays to the next week)
+ Rewrite duration expression support: DATEADD-based datetime +/- duration
  arithmetic with millisecond fractions, plain bigint arithmetic for
  duration-only expressions
+ Use standard OFFSET/FETCH row limiting (Firebird 3+) via
  DatabaseOperations.limit_offset_sql and drop the custom compiler SQL
  surgery
+ Register as_firebird handlers: inline plain literal Values (fixes
  "Data type unknown" for parameter-only expressions), CASE WHEN rendering
  for boolean-to-integer casts, TRIM for CASE over string literals (CHAR
  blank padding), and REPEAT emulation via RPAD
+ LIKE lookups on expressions now include an ESCAPE clause, and iregex is
  case-insensitive via UPPER
+ %-escapes in parameterless queries collapse correctly ('%%' -> '%')
+ Map CHECK constraint violations (SQLCODE -297) to IntegrityError
+ last_executed_query() now interpolates parameters for debugging
+ WITH TIME ZONE column types are only used when USE_TZ is enabled
+ sql_flush deletes tables in foreign key dependency order
+ New 'lock_timeout' entry in OPTIONS sets the transaction lock wait
  timeout in seconds (default: wait forever)
+ Implement DatabaseOperations.subtract_temporals() and enable
  supports_temporal_subtraction, so subtracting date/time/datetime fields
  yields DurationField results #84
+ RDB$DB_KEY can be used as db_column: the pseudo-column is no longer
  quoted #139
+ Known issue: Firebird 6 development builds ignore ORDER BY on DISTINCT
  queries filtered with IN (subquery); many_to_one.test_selects is skipped
  on Firebird 6 until this is fixed upstream
+ Schema editor fixes: auto-increment sequences/triggers are created only
  for real AutoFields (no longer for plain integer primary keys), run
  right after CREATE TABLE instead of via deferred SQL, and are dropped
  or created when a field alter changes auto-increment status; columns
  converted through the temp-column path (from/to blob) keep NOT NULL;
  collation changes are applied on alter (with an explicit CHARACTER SET,
  which ALTER TYPE needs), and altering to no collation resets to the
  character set default
+ Declare test_collations (UNICODE_CI/UNICODE) and
  supports_collation_on_textfield=False (blobs cannot be collated);
  introspection also reports domain-level column collations
+ Recover from dead attachments: when the server shuts a connection down
  (e.g. gfix -shut or a server restart), the backend discards it and the
  next operation reconnects instead of failing forever; driver objects of
  the dead attachment are quarantined so their finalizers cannot hang on
  wire calls
+ The schema app now runs to completion; remaining errors on Firebird 6
  development builds are caused by the server sporadically shutting down
  attachments under heavy DDL churn (under investigation upstream)


v1.11.0
-------
+ Initial adjustments for support django 1.11 #93
+ Add DatabaseOperations.time_trunc_sql() to support TimeField truncation #87
+ Add DatabaseOperations.datetime_cast_time_sql() to support time lookup #88
+ DatabaseIntrospection.get_constraints() enhanced due a get_indexes() deprecation #89
+ DatabaseIntrospection.get_constraints() method should include an 'orders' key #90
+ NameError: global name '_is_relevant_relation' is not defined #99
* Improvements in schema migration


v1.10.0
-------
+ Schema migration: fail to alter column size with unique index #82
+ Support for BigAutoField #83
+ Fix expression generation #85
+ AttributeError: 'DatabaseWrapper' object has no attribute 'pattern_ops' #86


v1.9.1
------
 + Update README


v1.9.0
------
+ Update schema.py from django 1.9 #64
+ Update operations.py #65
+ Removed unused DatabaseFeatures.can_introspect_max_length. #67


v1.8.3
------
+ Fail reading a blob field value using fdb 1.8  #81


v1.8.2
------
+ Delete ForeignKey field fails (-607) if column is referenced in index #70
+ Database Introspection doesn't return correctly field_length value from get_table_description #71


v1.8.1
------
+ DecimalField value is not converted correctly #69


v1.8.0
------
+ First version with django 1.8.x support
+ Implement new UUIDField #54
+ Implement new DurationField #55
+ DatabaseOperations: repleace convert_values by get_db_converters #56
+ DatabaseIntrospection: get_relations implementation change in 1.8 #57
+ Introspection of boolean field type fail #58
+ Create new object with a time field fails if microseconds greater than 6 digit  #60
+ django-firebird not working with non-default firebird port #62
+ Client db shell doesn't work on non-default firebird port #63


v1.7.1
------
+ Backported django-firebird not working with non-default firebird port #62


v1.7.0
------
+ Support for Django v1.7.x
+ First implementation of new schema migration feature
+ Role support #50
+ manage.py dbshell fails on Linux #48
+ Fixed Database introspection: get_indexes just return primary and unique keys #28
+ Fixed Firebird backend doesn't return views in introspection #27


v1.6.4
------
+ Fixed Error when extract exception info (fdb related bug) #44


v1.6.3
------
+ Support for PEP 440. #41
+ Update documentation


v1.6.2
------
+ Improve customized error info on exception. #40


v1.6.1
------
+ Minor bug fixes and improve documentation


v1.6.0 Release Candidate 2
--------------------------
+ Fixed Error in group by clause: only includes the primary key. #22


v1.6.0 Release Candidate 1
--------------------------
+ Fixed missing date_interval_sql implementation. #21
+ Fixed datetime_trunc_sql NotImplementedError. #20
+ Fixed missing SQLDateTimeCompiler. #19
+ Fixed BigIntegerField is not supported in introspection. #18
+ Fixed BinaryField is not supported in introspection. #17
+ Fixed missing method name. #11
+ Fixed setup.py due to README extension change. #12


v1.6.0 alpha
------------
+ Support for Django v1.6.
+ Support for previous django versions has been removed
+ Update README, change extension to .rst for better PyPI support


v1.5.1
------
+ Complete config of DatabaseFeatures
+ Fixes for Python 3 support


v1.5.0
------
+ Moved repository from google http://code.google.com/p/django-firebird/
+ Initial version with replacement of kinterbasdb by fdb
+ Added custom tests
+ Fixed db introspection issues #2
