AssertionError: Init script FAILED: {act.clean_stdout=}
assert   
  + Statement failed, SQLSTATE = 23000
  + violation of FOREIGN KEY constraint "BAL_FK_INV" on table "BALANCE"
  + -Foreign key reference target does not exist
  + -Problematic key value is ("CARD_KEY" = 0)

LOG DETAILS:

2026-03-30 14:24:00.314
2026-03-30 14:24:00.321 act = <firebird.qa.plugin.Action object at [hex]>
2026-03-30 14:24:00.329 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2026-03-30 14:24:00.337
2026-03-30 14:24:00.344 @pytest.mark.version('>=3.0')
2026-03-30 14:24:00.359 def test_1(act: Action, capsys):
2026-03-30 14:24:00.368
2026-03-30 14:24:00.375 init_script = """
2026-03-30 14:24:00.381 set bail on;
2026-03-30 14:24:00.387 recreate sequence g;
2026-03-30 14:24:00.397 recreate table inv_card(id int not null, usr int);
2026-03-30 14:24:00.405 recreate table balance(
2026-03-30 14:24:00.412 id int not null
2026-03-30 14:24:00.422 ,card_key int     -- FK to inv_card
2026-03-30 14:24:00.432 ,good_key int   

[...SKIPPED...]

:00.900 act.isql(switches = ['-q'], input = init_script, combine_output = True)
2026-03-30 14:24:00.908 >       assert act.clean_stdout == '', 'Init script FAILED: {act.clean_stdout=}'
2026-03-30 14:24:00.914 E       AssertionError: Init script FAILED: {act.clean_stdout=}
2026-03-30 14:24:00.921 E       assert
2026-03-30 14:24:00.934 E         + Statement failed, SQLSTATE = 23000
2026-03-30 14:24:00.943 E         + violation of FOREIGN KEY constraint "BAL_FK_INV" on table "BALANCE"
2026-03-30 14:24:00.949 E         + -Foreign key reference target does not exist
2026-03-30 14:24:00.955 E         + -Problematic key value is ("CARD_KEY" = 0)
2026-03-30 14:24:00.966
2026-03-30 14:24:00.982 tests/bugs/gh_8488_test.py:116: AssertionError
2026-03-30 14:24:00.991 ---------------------------- Captured stdout setup -----------------------------
2026-03-30 14:24:01.003 Creating db: localhost:/var/tmp/qa_2024/test_11314/test.fdb [page_size=None, sql_dialect=None, charset='NONE', user=SYSDBA, password=masterkey]