Repository navigation
T95 make database sqlite - #98
Merged
Merged
Conversation
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
This comment has been minimized.
This comment has been minimized.
Code Metrics Report
Details | | master (fe20ff2) | T95-make-database-sqlite | +/- |
| | | (0e6d02f) | |
|---------------------|------------------|--------------------------------|-------|
+ | Coverage | 99.8% | 99.8% | +0.0% |
| Files | 95 | 97 | +2 |
| Lines | 3894 | 3965 | +71 |
+ | Covered | 3887 | 3958 | +71 |
- | Test Execution Time | 9s | 13s | +4s |Code coverage of files in pull request scope (100.0% → 100.0%, patch 100.0%)
Reported by octocov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
In raising this pull request, I confirm the following:
composer test,composer csandcomposer analyzeall passAdded
make:database <driver>: it adds a database to a project that exists, in each flavor, ascrest new --databasedoes for a new project. It readscrest.php.crest init --database(and its question, the last one) writescrest.php, then does the same. The shared work is inCrest\Generator\Project\DatabaseSetup.Crest changes no file that exists. It writes
DbProviderin theproviderpath from the stubs ofnew(MVC: aPhalcon\Dbadapter; ADR: a DataMapperConnectionwith the aliasdb), and for SQLitestorage/database.sqliteandstorage/.gitkeep. A database file that exists stays, also with--force. Then it prints the line that registersDbProviderin the front controller, and the lines for.gitignoreand.env.DbProvider.phpthat exists stops the command before it writes a file;--forcewrites it again.initmakes this check before it writescrest.php. TheregisterProviders()check ofmake:provider(#81) moved toBootstrap::overriding(), so that the ADR guidance of both commands prints only the line to add when the front has the override.The database suite (SQLite) runs the printed line: a project from
crest newwith no database, in each flavor, and a project with nocrest.phpthroughinit --database, gets adbservice that opens its SQLite file. The compose service, the Dockerfile lines and the cases of a server database are in #96; the checks of a project that exists are in #97.Thanks