• Stars
    star
    63
  • Rank 484,938 (Top 10 %)
  • Language
    F#
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Super simple SQL Migrations Tool for SQLite, PostgreSQL, MySQL and SQL Server

.NET Core

Currently Working on the next version to also add better support for the VSCode Extension!

Migrondi

Migrondi is a SQL Migrations tool designed to be simple and execute simple migrations. Write SQL and execute SQL against your database.

No need to install it, use it from VSCode! https://github.com/AngelMunoz/migrondi-vscode

Migrondi Runs on Linux-x64, Linux-arm64, Windows-x64, and MacOS-x64 (intel based)

Install

For Non .NET users

Grab the binary from the releases page or build from source and put it on your PATH, that way the command is available globally e.g.

# you can put this at the end of your ~/.bashrc
# $HOME/Apps/migrondi is a directory where you have downloaded your "Migrondi" binary
export MIGRONDI_HOME="$HOME/Apps/migrondi"
export PATH="$PATH:$MIGRONDI_HOME"

For .NET users

you can now install this as a global/local tool as well

dotnet tool install --global Migrondi

Usage

Init

If you are starting from scratch you can run the init command to create the migrondi files and directories needed for the rest of the commands to work properly

~/Migrondi $ ./Migrondi init
Created /home/x/Migrondi/migrondi.json and /home/x/Migrondi/migrations
~/Migrondi $
PS C:\Users\x\Migrondi> ./Migrondi.exe init
Created C:\Users\x\Migrondi\migrondi.json and C:\Users\x\Migrondi\migrations\
PS C:\Users\x\Migrondi>

Then you can adapt the configuration as needed

Config File

to use this tool you need to supply a JSON configuration file (the name must be migrondi.json)

{
  "connection": "Data Source=Migrondi.db",
  "migrationsDir": "./migrations/",
  "driver": "sqlite"
}
  • connection

    This is a IDbConnection compatible connection string (you can find examples in the follwing links)

  • migrationsDir

    this is an absolute or relative path to where the migrations will be stored Note: please include the trailing slash to prevent writing on the directory above of the one you pointed to. (if you use the init command, this is created for you)

  • driver

    any of the following "mssql" "sqlite" "mysql" "postgres"

Migrondi 0.5.0
Copyright (C) 2020 Angel D. Munoz

  init       Creates basic files and directories to start using migrondi.

  new        Creates a new Migration file.

  up         Runs the migrations against the database.

  down       Rolls back migrations from the database.

  list       List the amount of migrations in the database.

  help       Display more information on a specific command.

  version    Display version information.

New

To create a new migration file run Migrondi.exe new -n CreateTodosTable where CreateTodosTable is the name of your migration, you can replace that name with your migration name it will create a new file with a name like this: SampleMigration_1586550686936.sql with the following contents

-- ---------- MIGRONDI:UP:1586550686936 --------------
-- Write your Up migrations here

-- ---------- MIGRONDI:DOWN:1586550686936 --------------
-- Write how to revert the migration here

Please do not remove the MIGRONDI:UP:TIMESTAMP and MIGRONDI:DOWN:TIMESTAMP comments these are used to differentiate what to run when you run the up or down commands.

Up

To run your migrations against your database use the "up" command Migrondi.exe up you can use -t <number> to specify how many migrations you want to run

Down

To rollback your migrations from your database use the "down" command Migrondi.exe down you can use -t <number> to specify how many migrations you want to roll back

List

If you want to list migrations you can use the command "list" Migrondi.exe list with the following flag combinations

  • Migrondi.exe list --last true
  • Migrondi.exe list --all true --missing true
  • Migrondi.exe list --all true --missing false

these will give you these outputs

  • Last migration in the database
  • All migrations that are missing
  • All migrations present in the database

Build

Use the build.fsx (dotnet fsi build.fsx) script or clone and run

dotnet publish -c Release -r <RID> --self-contained true -p:PublishSingleFile=true -o dist

replace RID and the angle brackets with any of the following

this should give you a binary file in the dist directory, after that put it wherever you want and add it to your path and you can start using it

More Repositories

1

Perla

A cross-platform tool for unbundled front-end development that doesn't depend on Node or requires you to install a complex toolchain
F#
132
star
2

sails-nuxt

Sails + Nuxt + Vuetify Combo <3
JavaScript
89
star
3

monosample

A sample Monorepo Repository using pnpm and sharing a common library accross multiple projects
TypeScript
49
star
4

Mondocks

An alternative way to interact with MongoDB databases from F# that allows you to use mongo-idiomatic constructs
F#
40
star
5

Bix

Bix, an F# micro-framework for cross-runtime JavaScript backends
F#
31
star
6

fable-bun

Fable bindings for Bun.sh
F#
25
star
7

Vue-UWP

So you think there is no Javascript Desktop native solution? I'm not so sure about that
Vue
18
star
8

Mandadin

A Bolero PWA (Blazor) SPA with Javascript Interop for 100% offline functionality
F#
18
star
9

Fable.Haunted

Fable Bindings for https://hauntedhooks.netlify.app/
F#
17
star
10

Raznor

Mirror of https://gitlab.com/AngelMunoz/Raznor/
F#
17
star
11

Hox

Async HTML rendering and a simplistic but extensible DSL based on css selectors.
F#
17
star
12

NvmFs

A dead-simple node version manager written in F#
F#
16
star
13

Navs

A set of libraries that allow Router-like experiences for general purpose F# Apps
F#
15
star
14

fable-deno

Deno bindings for Fable applications
F#
15
star
15

FsFediverseArchive

A Set of Google Cloud Functions Written in F# to archive some of my fediverse activity
F#
13
star
16

AvaFunc

Just a Sample Desktop App Using Avalonia.FuncUI
F#
12
star
17

Avalonia.Mvu

F#
12
star
18

package-fsharp-to-flatpak

A simple sample that shows what you need to package an F# app as a flatpak
F#
10
star
19

Sutil.Generator

Generates Sutil bindings for https://shoelace.style and https://fast.design
F#
9
star
20

Fable.Lit.Templates

F#
9
star
21

NXUIFSharpMultiPlatformTemplate

F#
8
star
22

perla-templates

A repository with samples showcasing what can the perla dev server do today
JavaScript
8
star
23

NXUIFSharpTemplate

A simple Avalonia + F# Starter Template
F#
8
star
24

Somnifero

F#
7
star
25

Giraffarig

Small Skeleton of a F# Web API with MongoDB and Giraffe
F#
7
star
26

HtmxWCSample

Sample of consuming Fable.Lit + HTMX with an F# Saturn Server
F#
7
star
27

MandadinFs

F#
7
star
28

sutil-experiments

F#
7
star
29

suave-dev-server-poc

F#
6
star
30

Fable.Remoting.Ts

Interact with your Fable.Remoting powered server from any typescript/javascript application in a seamless way, this library is meant to be used with Fable.Remoting
TypeScript
6
star
31

package-fsharp-to-snap

A simple sample that shows what you need to package an F# app as a snap
F#
6
star
32

Frandadin

fsharp equivalent of https://github.com/AngelMunoz/Recetron
F#
6
star
33

SafePerla

A SAFE stack template that uses Perla for the frontend rather than webpack/vite
F#
6
star
34

WinRTFs

A small showcase of some of the WinRT APIs that can be used thanks t the C#/WinRT projection https://github.com/microsoft/CsWinRT
F#
5
star
35

Escrito

F#
5
star
36

fs-ts

F#
4
star
37

migrondi-vscode

Migrondi running on VSCode!
F#
4
star
38

fable-lit-sample

A Fable sample built with lit-html, haunted and ionic framework
F#
4
star
39

sutil-and-web-components

F#
4
star
40

AureliaUWP

JavaScript
4
star
41

FuncUI.Wasm.Template

A simple Avalonia.FuncUI + WASM Starter Template
F#
4
star
42

AuExplorer

A small Proof of concept of an aurelia-script electron mixed app
JavaScript
4
star
43

expressive

A getting started with F# and Express
F#
4
star
44

Escalin

F#
3
star
45

Fable.Sutil.Templates

Some templates for Sutil and Fable.Lit together
F#
3
star
46

GCloudJsonToCsv

A simple GCloud function that takes a json payload and returns an excel file
F#
3
star
47

AvaloniaTest

xplat template for avalonia + avalonia.funcui
F#
3
star
48

NetSixSamples

F#
3
star
49

fs-components

F#
3
star
50

VideOnPerla

What is Vide? check it out
CSS
3
star
51

Fun.Blazor.Sample

A Fun.Blazor Starter github template
JavaScript
3
star
52

Recetron

A Full-Stack C# Blazor + Carter playground/learning space
C#
3
star
53

Siquelin

F#
3
star
54

Deskoder

F#
2
star
55

flask-minimal-skeleton

A Flask minimal Skeleton with JWT authentication and some basic auth endpoints
Python
2
star
56

safe-perla-v1

F#
2
star
57

AngelMunoz.Templates

Some simple templates for my own usage that you might find useful, feel free to open issues, feedback is welcome
F#
2
star
58

Raznorx

F#
2
star
59

FesGit

A toy git GUI using Avalonia.FuncUI
F#
2
star
60

Fun-Blazor-AutoInteractive

F# + Blazor with the new AutoInteractive mode for components sample
F#
2
star
61

FullSample

Uses Lenses with FuncUI (Full Sample)
F#
2
star
62

dotnet-new-web-fsharp

F#
2
star
63

sutil-fuse-box

F#
2
star
64

bonko

Kotlin
2
star
65

MultiWindow

F#
2
star
66

nest-iridium

TypeScript
2
star
67

Fable.ShadowStyles

Type Safe CSS for FSharp, a wrapper over https://developers.google.com/web/updates/2019/02/constructable-stylesheets
F#
2
star
68

Gist.DependencyManager.Gist

A gist dependency manager for F# Interactive
F#
2
star
69

FlaskBlueprintsDemo

Modular Website using flask blueprints
HTML
2
star
70

fable-plus-typescript-files-poc

JavaScript
2
star
71

FunPlayer

F#
1
star
72

fable-lit-store-sample

F#
1
star
73

SaturnSSE

This sample combines SSE and FileWatcher to notify the client when a file has changed
F#
1
star
74

SimpleHttpListener

F#
1
star
75

Flossy

F#
1
star
76

ItsHtml

F#
1
star
77

feliz-fuse-box

F#
1
star
78

PalabratorFable

F#
1
star
79

python-aws-s3

AWS S3 small sample upload/download/see files with flask
Python
1
star
80

Trackmat

A small console utility to keep track of my jira tickets/overtime
C#
1
star
81

koa-rest-xrp

TypeScript
1
star
82

FelizTs

A small PoC of consuming tsx within a Feliz F# application, that it allows in turn to consume any js library without F# bindings as well
JavaScript
1
star
83

Monolitro

C#
1
star
84

FsFraxine

F#
1
star
85

SpicySpa

F#
1
star
86

Frest

F#
1
star
87

Calcetate

F#
1
star
88

FluentSample

JavaScript
1
star
89

valdi-exp

F#
1
star
90

NetworkDetection

A Sample of how to detect and handle network changes on your Avalonia.FuncUI App
F#
1
star
91

novenio

Dart
1
star
92

fsharp-file-uploads

F#
1
star
93

fable-au

F#
1
star
94

Channelish

Kotlin
1
star
95

worker-sample

JavaScript
1
star
96

fable-urlpattern

Bindings for the URLPattern API
F#
1
star
97

Threads.Lib

A very barebones threads.net api library
F#
1
star
98

Nestish

Nest.JS running on Bun.sh
TypeScript
1
star
99

Mandabot

F# and AWS Lambda. A simple and effective way to go into serverless territory with the language you love
F#
1
star
100

react-ts-express-starter

TypeScript
1
star