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-27 10:52:27.900
2026-03-27 10:52:27.911 act = <firebird.qa.plugin.Action object at [hex]>
2026-03-27 10:52:27.921 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2026-03-27 10:52:27.929
2026-03-27 10:52:27.936 @pytest.mark.version('>=3.0')
2026-03-27 10:52:27.943 def test_1(act: Action, capsys):
2026-03-27 10:52:27.950
2026-03-27 10:52:27.965 init_script = """
2026-03-27 10:52:27.976 set bail on;
2026-03-27 10:52:27.984 recreate sequence g;
2026-03-27 10:52:27.990 recreate table inv_card(id int not null, usr int);
2026-03-27 10:52:27.998 recreate table balance(
2026-03-27 10:52:28.007 id int not null
2026-03-27 10:52:28.015 ,card_key int     -- FK to inv_card
2026-03-27 10:52:28.023 ,good_key int   

[...SKIPPED...]

:28.584 act.isql(switches = ['-q'], input = init_script, combine_output = True)
2026-03-27 10:52:28.593 >       assert act.clean_stdout == '', 'Init script FAILED: {act.clean_stdout=}'
2026-03-27 10:52:28.605 E       AssertionError: Init script FAILED: {act.clean_stdout=}
2026-03-27 10:52:28.616 E       assert
2026-03-27 10:52:28.627 E         + Statement failed, SQLSTATE = 23000
2026-03-27 10:52:28.634 E         + violation of FOREIGN KEY constraint "BAL_FK_INV" on table "BALANCE"
2026-03-27 10:52:28.641 E         + -Foreign key reference target does not exist
2026-03-27 10:52:28.648 E         + -Problematic key value is ("CARD_KEY" = 0)
2026-03-27 10:52:28.656
2026-03-27 10:52:28.664 tests/bugs/gh_8488_test.py:116: AssertionError
2026-03-27 10:52:28.673 ---------------------------- Captured stdout setup -----------------------------
2026-03-27 10:52:28.680 Creating db: localhost:/var/tmp/qa_2024/test_11314/test.fdb [page_size=None, sql_dialect=None, charset='NONE', user=SYSDBA, password=masterkey]