Skip to content

Commit

Permalink
Deployed e98391d with MkDocs version 1.6.0 (9.5.21+insiders.4.53.8)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfridman committed May 11, 2024
1 parent 092fa8a commit 409e35f
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 35 deletions.
65 changes: 65 additions & 0 deletions documentation/cli-commands/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,17 @@
</ul>
</nav>

</li>

<li class="md-nav__item">
<a href="#supported-drivers" class="md-nav__link">
<span class="md-ellipsis">

Supported Drivers

</span>
</a>

</li>

</ul>
Expand Down Expand Up @@ -1791,6 +1802,17 @@
</ul>
</nav>

</li>

<li class="md-nav__item">
<a href="#supported-drivers" class="md-nav__link">
<span class="md-ellipsis">

Supported Drivers

</span>
</a>

</li>

</ul>
Expand Down Expand Up @@ -1842,6 +1864,49 @@ <h3 id="create"><strong>create</strong></h3>
<p>Creates new migration file with the current timestamp</p>
<h3 id="fix"><strong>fix</strong></h3>
<p>Apply sequential ordering to migrations</p>
<h2 id="supported-drivers">Supported Drivers</h2>
<table>
<thead>
<tr>
<th>Driver</th>
<th>Go package</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>clickhouse</code></td>
<td><code>github.com/ClickHouse/clickhouse-go/v2</code></td>
</tr>
<tr>
<td><code>mssql</code></td>
<td><code>github.com/microsoft/go-mssqldb</code></td>
</tr>
<tr>
<td><code>mysql</code></td>
<td><code>github.com/go-sql-driver/mysql</code></td>
</tr>
<tr>
<td><code>postgres</code></td>
<td><code>github.com/jackc/pgx/v5/stdlib</code></td>
</tr>
<tr>
<td><code>sqlite3</code></td>
<td><code>modernc.org/sqlite</code></td>
</tr>
<tr>
<td><code>turso</code></td>
<td><code>github.com/tursodatabase/libsql-client-go/libsql</code></td>
</tr>
<tr>
<td><code>vertica</code></td>
<td><code>github.com/vertica/vertica-sql-go</code></td>
</tr>
<tr>
<td><code>ydb</code></td>
<td><code>github.com/yandex-cloud/ydb-go-sdk/v2</code></td>
</tr>
</tbody>
</table>



Expand Down
32 changes: 13 additions & 19 deletions documentation/custom-store/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -943,10 +943,9 @@
</span>
</a>

<nav class="md-nav" aria-label="Store interface">
<ul class="md-nav__list">

<li class="md-nav__item">
</li>

<li class="md-nav__item">
<a href="#example" class="md-nav__link">
<span class="md-ellipsis">

Expand All @@ -955,11 +954,6 @@
</span>
</a>

</li>

</ul>
</nav>

</li>

</ul>
Expand Down Expand Up @@ -1576,10 +1570,9 @@
</span>
</a>

<nav class="md-nav" aria-label="Store interface">
<ul class="md-nav__list">

<li class="md-nav__item">
</li>

<li class="md-nav__item">
<a href="#example" class="md-nav__link">
<span class="md-ellipsis">

Expand All @@ -1588,11 +1581,6 @@
</span>
</a>

</li>

</ul>
</nav>

</li>

</ul>
Expand Down Expand Up @@ -1644,27 +1632,33 @@ <h2 id="store-interface">Store interface</h2>
<span class="w"> </span><span class="c1">// Tablename is the name of the version table. This table is used to record applied migrations</span>
<span class="w"> </span><span class="c1">// and must not be an empty string.</span>
<span class="w"> </span><span class="nx">Tablename</span><span class="p">()</span><span class="w"> </span><span class="kt">string</span>

<span class="w"> </span><span class="c1">// CreateVersionTable creates the version table, which is used to track migrations. When</span>
<span class="w"> </span><span class="c1">// creating this table, the implementation MUST also insert a row for the initial version (0).</span>
<span class="w"> </span><span class="nx">CreateVersionTable</span><span class="p">(</span><span class="nx">ctx</span><span class="w"> </span><span class="nx">context</span><span class="p">.</span><span class="nx">Context</span><span class="p">,</span><span class="w"> </span><span class="nx">db</span><span class="w"> </span><span class="nx">DBTxConn</span><span class="p">)</span><span class="w"> </span><span class="kt">error</span>

<span class="w"> </span><span class="c1">// Insert a version id into the version table.</span>
<span class="w"> </span><span class="nx">Insert</span><span class="p">(</span><span class="nx">ctx</span><span class="w"> </span><span class="nx">context</span><span class="p">.</span><span class="nx">Context</span><span class="p">,</span><span class="w"> </span><span class="nx">db</span><span class="w"> </span><span class="nx">DBTxConn</span><span class="p">,</span><span class="w"> </span><span class="nx">req</span><span class="w"> </span><span class="nx">InsertRequest</span><span class="p">)</span><span class="w"> </span><span class="kt">error</span>

<span class="w"> </span><span class="c1">// Delete a version id from the version table.</span>
<span class="w"> </span><span class="nx">Delete</span><span class="p">(</span><span class="nx">ctx</span><span class="w"> </span><span class="nx">context</span><span class="p">.</span><span class="nx">Context</span><span class="p">,</span><span class="w"> </span><span class="nx">db</span><span class="w"> </span><span class="nx">DBTxConn</span><span class="p">,</span><span class="w"> </span><span class="nx">version</span><span class="w"> </span><span class="kt">int64</span><span class="p">)</span><span class="w"> </span><span class="kt">error</span>

<span class="w"> </span><span class="c1">// GetMigration retrieves a single migration by version id. If the query succeeds, but the</span>
<span class="w"> </span><span class="c1">// version is not found, this method must return [ErrVersionNotFound].</span>
<span class="w"> </span><span class="nx">GetMigration</span><span class="p">(</span><span class="nx">ctx</span><span class="w"> </span><span class="nx">context</span><span class="p">.</span><span class="nx">Context</span><span class="p">,</span><span class="w"> </span><span class="nx">db</span><span class="w"> </span><span class="nx">DBTxConn</span><span class="p">,</span><span class="w"> </span><span class="nx">version</span><span class="w"> </span><span class="kt">int64</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="nx">GetMigrationResult</span><span class="p">,</span><span class="w"> </span><span class="kt">error</span><span class="p">)</span>

<span class="w"> </span><span class="c1">// GetLatestVersion retrieves the last applied migration version. If no migrations exist, this</span>
<span class="w"> </span><span class="c1">// method must return [ErrVersionNotFound].</span>
<span class="w"> </span><span class="nx">GetLatestVersion</span><span class="p">(</span><span class="nx">ctx</span><span class="w"> </span><span class="nx">context</span><span class="p">.</span><span class="nx">Context</span><span class="p">,</span><span class="w"> </span><span class="nx">db</span><span class="w"> </span><span class="nx">DBTxConn</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="kt">int64</span><span class="p">,</span><span class="w"> </span><span class="kt">error</span><span class="p">)</span>

<span class="w"> </span><span class="c1">// ListMigrations retrieves all migrations sorted in descending order by id or timestamp. If</span>
<span class="w"> </span><span class="c1">// there are no migrations, return empty slice with no error. Typically this method will return</span>
<span class="w"> </span><span class="c1">// at least one migration, because the initial version (0) is always inserted into the version</span>
<span class="w"> </span><span class="c1">// table when it is created.</span>
<span class="w"> </span><span class="nx">ListMigrations</span><span class="p">(</span><span class="nx">ctx</span><span class="w"> </span><span class="nx">context</span><span class="p">.</span><span class="nx">Context</span><span class="p">,</span><span class="w"> </span><span class="nx">db</span><span class="w"> </span><span class="nx">DBTxConn</span><span class="p">)</span><span class="w"> </span><span class="p">([]</span><span class="o">*</span><span class="nx">ListMigrationsResult</span><span class="p">,</span><span class="w"> </span><span class="kt">error</span><span class="p">)</span>
<span class="p">}</span>
</code></pre></div>
<h3 id="example">Example</h3>
<h2 id="example">Example</h2>
<p>Although a bit of a contrived example, see this
<a href="https://github.com/mfridman/goose-demo/blob/d5bb88465b4b270fa6190326945568f30a227b06/customstore/memory/memory.go">memory store</a>
for a reference implementation.</p>
Expand Down
16 changes: 4 additions & 12 deletions documentation/environment-variables/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1496,18 +1496,10 @@ <h1 id="environment-variables">Environment variables</h1>
<p>Environment variables have lower precedence than command line arguments and flags.</p>
<p>The following environment variables are supported:</p>
<ul>
<li>
<p><code>GOOSE_DRIVER</code> - The database driver to use</p>
</li>
<li>
<p><code>GOOSE_DBSTRING</code> - The database connection string</p>
</li>
<li>
<p><code>GOOSE_MIGRATION_DIR</code> - The directory containing the migration files (default: <code>.</code>)</p>
</li>
<li>
<p><code>NO_COLOR</code> - Disable color output</p>
</li>
<li><code>GOOSE_DRIVER</code> - The database driver to use</li>
<li><code>GOOSE_DBSTRING</code> - The database connection string</li>
<li><code>GOOSE_MIGRATION_DIR</code> - The directory containing the migration files (default: <code>.</code>)</li>
<li><code>NO_COLOR</code> - Disable color output</li>
</ul>


Expand Down
2 changes: 1 addition & 1 deletion feed_json_updated.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": "https://jsonfeed.org/version/1", "title": "pressly/goose", "home_page_url": "https://pressly.github.io/goose/", "feed_url": "https://pressly.github.io/goose/feed_json_updated.json", "description": "The missing goose docs.", "icon": null, "authors": [], "language": "en", "items": [{"id": "https://pressly.github.io/goose/blog/2021/welcome/", "url": "https://pressly.github.io/goose/blog/2021/welcome/", "title": "Hello, docs!", "content_html": "Introductory blog post.", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2021-07-welcome.png", "date_modified": "2024-05-11T17:41:23+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog"]}, {"id": "https://pressly.github.io/goose/blog/2021/embed-sql-migrations/", "url": "https://pressly.github.io/goose/blog/2021/embed-sql-migrations/", "title": "Embedding migrations", "content_html": "Embed your SQL files directly into goose binary. No more copying files around!", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2021-08-embed-sql-migrations.png", "date_modified": "2024-05-11T17:41:23+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "Go migrations"]}, {"id": "https://pressly.github.io/goose/blog/2021/better-tests/", "url": "https://pressly.github.io/goose/blog/2021/better-tests/", "title": "Better tests with containers", "content_html": "A container a test makes the bugs \ud83d\udc1b go away.", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2021-09-better-tests.png", "date_modified": "2024-05-11T17:41:23+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "Testing"]}, {"id": "https://pressly.github.io/goose/blog/2021/out-of-order-migrations/", "url": "https://pressly.github.io/goose/blog/2021/out-of-order-migrations/", "title": "support for out-of-order migrations", "content_html": "<h1>Adding support for out-of-order migrations</h1>\n<p>Starting with <code>goose</code> <a href=\"https://github.com/pressly/goose/releases/tag/v3.3.0\">v3.3.0</a> we added the\nability to apply missing (out-of-order) migrations. Thanks for all the the community feedback over\nthe years.</p>", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2021-10-out-of-order-migrations.png", "date_modified": "2024-05-11T17:41:23+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "General"]}, {"id": "https://pressly.github.io/goose/blog/2021/no-version-migrations/", "url": "https://pressly.github.io/goose/blog/2021/no-version-migrations/", "title": "Ad-hoc migrations with no versioning", "content_html": "Database seeding. Apply migrations with no versioning.", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2021-12-no-version-migrations.png", "date_modified": "2024-05-11T17:41:23+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "General"]}, {"id": "https://pressly.github.io/goose/blog/2021/visualizing-up-down-commands/", "url": "https://pressly.github.io/goose/blog/2021/visualizing-up-down-commands/", "title": "Visualizing goose up and down commands", "content_html": "Visualizing goose up and down commands.", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2021-12-visualizing-up-down-commands.png", "date_modified": "2024-05-11T17:41:23+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "General"]}, {"id": "https://pressly.github.io/goose/blog/2022/improving-clickhouse/", "url": "https://pressly.github.io/goose/blog/2022/improving-clickhouse/", "title": "Improving ClickHouse support", "content_html": "goose improves ClickHouse support. Bug fixes, improvements, full end-end tests and upgrade to ClickHouse/clickhouse-go v2 driver.", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2022-06-improving-clickhouse-support.png", "date_modified": "2024-05-11T17:41:23+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "ClickHouse"]}, {"id": "https://pressly.github.io/goose/blog/2022/overview-sql-file/", "url": "https://pressly.github.io/goose/blog/2022/overview-sql-file/", "title": "SQL migration files and goose annotations", "content_html": "An overview of goose SQL migrations and annotations.", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2022-12-sql-migration-files.png", "date_modified": "2024-05-11T17:41:23+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "SQL migrations"]}, {"id": "https://pressly.github.io/goose/blog/2023/goose-provider/", "url": "https://pressly.github.io/goose/blog/2023/goose-provider/", "title": "Adding a goose provider", "content_html": "Introduction to the new goose provider", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2023-11-goose-provider.png", "date_modified": "2024-05-11T17:41:23+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "Package"]}, {"id": "https://pressly.github.io/goose/blog/2024/goose-sqlc/", "url": "https://pressly.github.io/goose/blog/2024/goose-sqlc/", "title": "Using sqlc and goose", "content_html": "How to use sqlc and goose", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2024-02-goose-sqlc.png", "date_modified": "2024-05-11T17:41:23+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog"]}]}
{"version": "https://jsonfeed.org/version/1", "title": "pressly/goose", "home_page_url": "https://pressly.github.io/goose/", "feed_url": "https://pressly.github.io/goose/feed_json_updated.json", "description": "The missing goose docs.", "icon": null, "authors": [], "language": "en", "items": [{"id": "https://pressly.github.io/goose/blog/2021/welcome/", "url": "https://pressly.github.io/goose/blog/2021/welcome/", "title": "Hello, docs!", "content_html": "Introductory blog post.", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2021-07-welcome.png", "date_modified": "2024-05-11T18:00:51+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog"]}, {"id": "https://pressly.github.io/goose/blog/2021/embed-sql-migrations/", "url": "https://pressly.github.io/goose/blog/2021/embed-sql-migrations/", "title": "Embedding migrations", "content_html": "Embed your SQL files directly into goose binary. No more copying files around!", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2021-08-embed-sql-migrations.png", "date_modified": "2024-05-11T18:00:51+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "Go migrations"]}, {"id": "https://pressly.github.io/goose/blog/2021/better-tests/", "url": "https://pressly.github.io/goose/blog/2021/better-tests/", "title": "Better tests with containers", "content_html": "A container a test makes the bugs \ud83d\udc1b go away.", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2021-09-better-tests.png", "date_modified": "2024-05-11T18:00:51+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "Testing"]}, {"id": "https://pressly.github.io/goose/blog/2021/out-of-order-migrations/", "url": "https://pressly.github.io/goose/blog/2021/out-of-order-migrations/", "title": "support for out-of-order migrations", "content_html": "<h1>Adding support for out-of-order migrations</h1>\n<p>Starting with <code>goose</code> <a href=\"https://github.com/pressly/goose/releases/tag/v3.3.0\">v3.3.0</a> we added the\nability to apply missing (out-of-order) migrations. Thanks for all the the community feedback over\nthe years.</p>", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2021-10-out-of-order-migrations.png", "date_modified": "2024-05-11T18:00:51+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "General"]}, {"id": "https://pressly.github.io/goose/blog/2021/no-version-migrations/", "url": "https://pressly.github.io/goose/blog/2021/no-version-migrations/", "title": "Ad-hoc migrations with no versioning", "content_html": "Database seeding. Apply migrations with no versioning.", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2021-12-no-version-migrations.png", "date_modified": "2024-05-11T18:00:51+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "General"]}, {"id": "https://pressly.github.io/goose/blog/2021/visualizing-up-down-commands/", "url": "https://pressly.github.io/goose/blog/2021/visualizing-up-down-commands/", "title": "Visualizing goose up and down commands", "content_html": "Visualizing goose up and down commands.", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2021-12-visualizing-up-down-commands.png", "date_modified": "2024-05-11T18:00:51+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "General"]}, {"id": "https://pressly.github.io/goose/blog/2022/improving-clickhouse/", "url": "https://pressly.github.io/goose/blog/2022/improving-clickhouse/", "title": "Improving ClickHouse support", "content_html": "goose improves ClickHouse support. Bug fixes, improvements, full end-end tests and upgrade to ClickHouse/clickhouse-go v2 driver.", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2022-06-improving-clickhouse-support.png", "date_modified": "2024-05-11T18:00:51+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "ClickHouse"]}, {"id": "https://pressly.github.io/goose/blog/2022/overview-sql-file/", "url": "https://pressly.github.io/goose/blog/2022/overview-sql-file/", "title": "SQL migration files and goose annotations", "content_html": "An overview of goose SQL migrations and annotations.", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2022-12-sql-migration-files.png", "date_modified": "2024-05-11T18:00:51+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "SQL migrations"]}, {"id": "https://pressly.github.io/goose/blog/2023/goose-provider/", "url": "https://pressly.github.io/goose/blog/2023/goose-provider/", "title": "Adding a goose provider", "content_html": "Introduction to the new goose provider", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2023-11-goose-provider.png", "date_modified": "2024-05-11T18:00:51+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog", "Package"]}, {"id": "https://pressly.github.io/goose/blog/2024/goose-sqlc/", "url": "https://pressly.github.io/goose/blog/2024/goose-sqlc/", "title": "Using sqlc and goose", "content_html": "How to use sqlc and goose", "image": "https://pressly.github.io/goose/assets/images/social/blog/posts/2024-02-goose-sqlc.png", "date_modified": "2024-05-11T18:00:51+00:00", "authors": [{"name": "mfridman"}], "tags": ["Blog"]}]}
Loading

0 comments on commit 409e35f

Please sign in to comment.