Add `withInitScripts` to the SQL database modules
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 67/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, typescript
- 領域
- databases
調査の方向性
Start in the module source directories listed in the issue, and check how each database image handles initialization scripts; Java and Go examples are linked in the notes. Implement withInitScripts(...paths) in one module, preserving the supplied order and using its image init directory or database CLI as appropriate. Done means scripts run in order for that module; coordinate the method name with issue #1538.
索引モデルが issue の本文から書いたものです。
説明
What happens
None of the SQL database modules has a way to run a schema or seed script at startup. Their builder methods are limited to credentials and the database name:
| Module | Builder methods |
|---|---|
| postgresql | withDatabase, withUsername, withPassword, withSSL, withSSLCert |
| mysql, mariadb | withDatabase, withUsername, withUserPassword, withRootPassword |
| mssqlserver | withDatabase, withPassword, withWaitForMessage |
| cockroachdb | withDatabase, withUsername |
| clickhouse, oraclefree | withDatabase, withUsername, withPassword |
Users copy files into the image's init directory themselves, which means knowing that directory for each image:
new PostgreSqlContainer(image).withCopyFilesToContainer([
{ source: "./schema.sql", target: "/docker-entrypoint-initdb.d/schema.sql" },
]);
For images with no init directory (SQL Server), it means running the script with exec after start.
Expected
withInitScripts(...paths) on each SQL module, run in the order given, using the image's init directory where there is one and the database's CLI otherwise.
Where
packages/modules/{postgresql,mysql,mariadb,mssqlserver,cockroachdb,clickhouse,oraclefree}/src.
Notes
- Java has
withInitScriptandwithInitScriptsonJdbcDatabaseContainer, shared by every JDBC module. Go hasWithInitScriptsandWithOrderedInitScriptson postgres andWithScriptson mysql. - Each module is an independent change.
Dependencies
- Nothing blocks this. It can start now.
- Coordinate with #1538: for the method name.
- 主要言語
- TypeScript
- スター
- 2.6k
- フォーク
- 277
- 平均マージ
- 1日 53分
- マージ済み PR(30日)
- 58
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
testcontainers/testcontainers-node のほかの issue
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
testcontainers/testcontainers-node#1539 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
testcontainers/testcontainers-node#1533 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
testcontainers/testcontainers-node#1531 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
testcontainers/testcontainers-node#1529 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
testcontainers/testcontainers-node#1528 ·
メンテナーはふだん 1 日以内に返信
testcontainers/testcontainers-node の issue をすべて見る
似ている issue
-
freshness freshness:observed-only
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
thoroc/context-radar#280 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
documentation story
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
bug category:billing priority:p3 track:fast
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
LanternOps/breeze#9223 ·
メンテナーはふだん 1 日以内に返信