公開日 2020.11.3カテゴリ:Laravelタグ:PHP,Laravel,Factory
Today at around 10:45pm CET, after a couple of glasses of red wine, I deleted the production database for my online product (KeepTheScore.com, an online scoreboard app) by accident 😨. Over 300.00 scoreboards and their associated data were vaporised in an instant. By the way, I’m a one-man show, building a software product for a living. My product is keepthescore.com, an online scoreboard and lead
About the content This content has been published here with the express permission of the author. Promises are a well-known design pattern used to delay evaluation of future values, and to pipeline operations in an asynchronous manner. Typically, there are three internal states used to control the behavior of promises, but there is a lack of core interfaces essential to iOS & OS X development. To
自動化。 どうせ誰も見ないって。 show create table 見たほうが早いし。 mysqldump --no-data -uroot --database employees をリポジトリに入れてバージョン管理しとけば良いと思うけど、 何らかの文書化が必要な場合は毎回差分を修正するより全部出力した方がラク。 カラム名日本語がよければ適当に as で別名つけるとよい。 mysqlの場合 #!/bin/bash MYSQL="mysql -B -uroot" DBNAME="employees" TBLSQL=`cat << EOD SELECT TABLE_NAME, TABLE_COMMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '$DBNAME' AND table_name LIKE '%s' EOD` CO
Laravel 4 でデータベースを使ったテストを書く際の Tips です。 自動テストでデータベースにアクセステストを書く際に大切なのが、データベーステーブルのデータをテストで想定された状態にしておくということです。テーブルの内容がテストを実行される度に異なると、ある時はテストが通って、ある時は通らないという状態になります。 この「想定された状態」をセットアップするために、フレームワークで用意されている Migration と Seeder を利用しています。 テストケースでマイグレーション実行 開発を進めていると、データベーススキーマを変更する場合があります。マイグレーションファイルを作成して、php artisan migrate コマンドで適用するのことになります。テスト用データベースについても適用する必要がありますが、php artisan migrate --env=testi
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く