Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
Knex.js (pronounced /kəˈnɛks/) is a "batteries included" SQL query builder for PostgreSQL, CockroachDB, MSSQL, MySQL, MariaDB, SQLite3, Better-SQLite3, Oracle, and Amazon Redshift designed to be flexible, portable, and fun to use. It features both traditional node style callbacks as well as a promise interface for cleaner async flow control, a stream interface, full-featured query and schema build
Today I’d like to share the steps I take when I need to convert a PostgreSQL database into a SQLite database. Commonly I have to do this when a Ruby on Rails application is in production and I have to check some issues with the production data. In the production environment we usually use a PostgreSQL database and for developing I use a SQLite database, so we need some conversion. Short story a.k.
備忘録。ここでいう VIEW は DB で CREATE VIEW AS .. するあれです。ActionPack とは関係ないです。試したのはすべてSQLiteです。 とりあえずけっこう普通に使える。 例えば CREATE VIEW AS calculated_results をすると、CalculatedResult クラスから普通に読める。 `id`問題(後述)は残るので view をさらに include で JOIN しようとすると落ちる `id`カラムがあるのを前提に t.id as t0_id とかいう SQL を発行するのでそんなカラムないよエラーになる。当然といえば当然。 そもそも view の identifier てなんなんだろうなぁ。 実利面だけを考えれば、全レコード NULL のカラムを用意すればよろし。 rake db:schema:dump では抜けない テス
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く