Add database connexion #6
Merged
maxime.batista
merged 7 commits from setup-database
into master
1 year ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'setup-database'
Deleting a branch is permanent. It CANNOT be undone. Continue?
This pull request adds a connection with the database, defined by the used profile.
You can see in
src/index.php
(on line 27) that the connexion is initialized :You'll have to pass the connection object threw your gateways to do requests.
- rsync -avz -e "ssh -p 80 -o 'StrictHostKeyChecking=no'" --delete /outputs/* iqball@maxou.dev:/server/nginx/IQBall/$DRONE_BRANCH
-
- echo "cd /server/nginx/IQBall/$DRONE_BRANCH && chmod 777 . sql" | ssh -p 80 -o 'StrictHostKeyChecking=no' iqball@maxou.dev '/usr/bin/bash'
export default function DisplayResults({password, username}: any) {
export default function DisplayResults({results}: { results: { name: string, description: string }[] }) {
Inlining property types makes the code not very readable, especially when it is nested.
Consider declaring the props in a separate interface or type:
export default function DisplayResults({password, username}: any) {
export default function DisplayResults({results}: { results: { name: string, description: string }[] }) {
const list = results.map(({name, description}) =>
<div>
When rendering a list, each element should have a unique key to re-render the component.
if ($req === "")
break;
$pdo->query($req);
}
// in order for the touch to work
//
// Workaround in CI by setting permissions to 777 to the folder
touch(__DIR__ . "/.guard");
An alternative solution would be to ask the database its schema version.
Consider the following code:
If the variable is greater than zero, you know that the database has been created.
Ultimately the version is stored in the database, and dictates which migrations are required:
7683dd2129
into master 1 year agoReviewers
7683dd2129
.