Skip to content

release/v1.6.73 - #318

Merged
roncodes merged 1 commit into
mainfrom
release/v1.6.73
Oct 22, 2026
Merged

roncodes merged 1 commit into
mainfrom
release/v1.6.73

Conversation

@roncodes

Copy link
Copy Markdown
Member

mysql:createdb works on a fresh install again

mysql:createdb failed with "Unknown database" on a fresh install.

Cause: CoreServiceProvider::scheduleCommands() calls Setting::doesntHaveConnection() while every command boots. That opens the mysql connection with the configured schema selected, and Laravel caches it. The command then set the schema name to null in config, but the cached connection never saw that change. So CREATE DATABASE ran on a connection pointing at the very database it was meant to create.

Fix:

  • CreateDatabase now calls DB::purge('mysql') before each CREATE DATABASE, and again after restoring the schema name, so later code reconnects with the right schema.
  • Setting::hasConnection() calls DB::purge() when its check fails, so a broken connection isn't left cached for other code.

Tests:

  • The DatabaseCommandsTest DB fake gains purge(), plus a test asserting the purge → statement → purge order.
  • The SettingModelTest fake gains purge(), and the test asserts the failure path purges.

Also bumps composer.json to 1.6.73 and replaces RELEASE.md.

After this is tagged, the API can move to 1.6.73. Deployments that override CreateDatabase in api/app/Console/Commands can then drop the override and its AppServiceProvider binding.

🤖 Generated with Claude Code

…E DATABASE

Setting::doesntHaveConnection() opens the mysql connection with the configured
schema selected while the app boots. Clearing the schema name in config doesn't
touch that cached connection, so CREATE DATABASE failed with Unknown database on
a fresh install. Purge before each statement and after restoring the schema, and
purge in Setting::hasConnection() when the check fails.

Release v1.6.73.
@roncodes roncodes mentioned this pull request Oct 22, 2026
1 task
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (931d48e) to head (cc2abaa).

Additional details and impacted files
@@             Coverage Diff             @@
##                main      #318   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity      8935      8935           
===========================================
  Files            473       473           
  Lines          28064     28067    +3     
===========================================
+ Hits           28064     28067    +3     
Flag Coverage Δ
backend 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roncodes
roncodes merged commit 494d885 into main Oct 22, 2026
7 checks passed
@roncodes
roncodes deleted the release/v1.6.73 branch October 22, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant