Skip to content

Commit

Permalink
doc: upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisvisco committed May 19, 2024
1 parent f3131d2 commit 90a7b11
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 47 deletions.
39 changes: 2 additions & 37 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,6 @@
# Website
# Documentation

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
25 changes: 16 additions & 9 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
---
sidebar_position: 1
---

[![Go Report Card](https://goreportcard.com/badge/github.com/alexisvisco/amigo)](https://goreportcard.com/report/github.com/alexisvisco/amigo)
[![GoDoc](https://pkg.go.dev/badge/alexisvisco/mig)](https://pkg.go.dev/alexisvisco/mig)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![GitHub release](https://img.shields.io/github/v/release/alexisvisco/amigo.svg)](https://github.com/alexisvisco/amigo/releases)
[![Tests](https://github.com/alexisvisco/amigo/actions/workflows/tests.yml/badge.svg)](https://github.com/alexisvisco/amigo/actions/workflows/tests.yml)

# Introduction

Expand All @@ -11,6 +16,8 @@ A Migration In Golang (AMIGO) is a library that allows you to write migrations i
It provides you with all the benefits of Go, including type safety, simplicity, and strong tooling support.
AMIGO is designed to be easy to use and integrate into existing projects.

General documentation: [https://amigo.alexisvis.co](https://amigo.alexisvis.co)

## Why another migration library?

First thing, I don't have anything against SQL migrations file library. I appreciate them but somethimes with SQL files you are limited to do complex migrations that imply your models and business logic.
Expand Down Expand Up @@ -50,26 +57,26 @@ mit migrate # apply the migration
package migrations

import (
"github.com/alexisvisco/amigo/pkg/schema/pg"
"github.com/alexisvisco/amigo/pkg/schema"
"time"
"github.com/alexisvisco/amigo/pkg/schema/pg"
"github.com/alexisvisco/amigo/pkg/schema"
"time"
)

type Migration20240502155033SchemaVersion struct {}

func (m Migration20240502155033SchemaVersion) Change(s *pg.Schema) {
s.CreateTable("public.mig_schema_versions", func(s *pg.PostgresTableDef) {
s.String("id")
})
s.CreateTable("public.mig_schema_versions", func(s *pg.PostgresTableDef) {
s.String("id")
})
}

func (m Migration20240502155033SchemaVersion) Name() string {
return "schema_version"
return "schema_version"
}

func (m Migration20240502155033SchemaVersion) Date() time.Time {
t, _ := time.Parse(time.RFC3339, "2024-05-02T17:50:33+02:00")
return t
t, _ := time.Parse(time.RFC3339, "2024-05-02T17:50:33+02:00")
return t
}
```

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![GoDoc](https://pkg.go.dev/badge/alexisvisco/mig)](https://pkg.go.dev/alexisvisco/mig)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![GitHub release](https://img.shields.io/github/v/release/alexisvisco/amigo.svg)](https://github.com/alexisvisco/amigo/releases)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/alexisvisco/amigo/CI)](https://github.com/alexisvisco/amigo/actions)
[![Tests](https://github.com/alexisvisco/amigo/actions/workflows/tests.yml/badge.svg)](https://github.com/alexisvisco/amigo/actions/workflows/tests.yml)

# Introduction

Expand Down

0 comments on commit 90a7b11

Please sign in to comment.