• Stars
    star
    63
  • Rank 467,673 (Top 10 %)
  • Language
    F#
  • License
    MIT License
  • Created about 4 years ago
  • Updated 10 months 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#
130
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#
30
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

NvmFs

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

fable-deno

Deno bindings for Fable applications
F#
15
star
13

Hox

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

FsFediverseArchive

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

AvaFunc

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

package-fsharp-to-flatpak

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

Avalonia.Mvu

F#
10
star
18

Sutil.Generator

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

Fable.Lit.Templates

F#
9
star
20

NXUIFSharpMultiPlatformTemplate

F#
8
star
21

perla-templates

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

Somnifero

F#
7
star
23

NXUIFSharpTemplate

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

Giraffarig

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

sutil-experiments

F#
7
star
26

Navs

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

HtmxWCSample

Sample of consuming Fable.Lit + HTMX with an F# Saturn Server
F#
6
star
28

MandadinFs

F#
6
star
29

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
30

suave-dev-server-poc

F#
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

NetSixSamples

F#
4
star
38

migrondi-vscode

Migrondi running on VSCode!
F#
4
star
39

fable-lit-sample

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

sutil-and-web-components

F#
4
star
41

AureliaUWP

JavaScript
4
star
42

FuncUI.Wasm.Template

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

AuExplorer

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

expressive

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

Escalin

F#
3
star
46

GCloudJsonToCsv

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

Fable.Sutil.Templates

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

AvaloniaTest

xplat template for avalonia + avalonia.funcui
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

FullSample

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

bonko

Kotlin
2
star
62

dotnet-new-web-fsharp

F#
2
star
63

sutil-fuse-box

F#
2
star
64

MultiWindow

F#
2
star
65

nest-iridium

TypeScript
2
star
66

Fable.ShadowStyles

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

Gist.DependencyManager.Gist

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

FlaskBlueprintsDemo

Modular Website using flask blueprints
HTML
2
star
69

fable-plus-typescript-files-poc

JavaScript
2
star
70

FunPlayer

F#
1
star
71

fable-lit-store-sample

F#
1
star
72

Flossy

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

ItsHtml

F#
1
star
76

feliz-fuse-box

F#
1
star
77

PalabratorFable

F#
1
star
78

koa-rest-xrp

TypeScript
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

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
82

Monolitro

C#
1
star
83

fable-urlpattern

Bindings for the URLPattern API
F#
1
star
84

FsFraxine

F#
1
star
85

SpicySpa

F#
1
star
86

Fun-Blazor-AutoInteractive

F# + Blazor with the new AutoInteractive mode for components sample
F#
1
star
87

NetworkDetection

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

Frest

F#
1
star
89

Calcetate

F#
1
star
90

FluentSample

JavaScript
1
star
91

valdi-exp

F#
1
star
92

novenio

Dart
1
star
93

fsharp-file-uploads

F#
1
star
94

fable-au

F#
1
star
95

WinJS-ES2015-UWP

JavaScript
1
star
96

Channelish

Kotlin
1
star
97

worker-sample

JavaScript
1
star
98

Mandabot

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

react-ts-express-starter

TypeScript
1
star
100

rendo-poc

F#
1
star