ogata-k / mig

This application is converter from mig-file to migration-file of Web framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mig

本ソフトウェアMigはmgファイルからLaravelやRailsのマイグレーションファイルを生成するソフトウェアです。

mgファイルの使用は次のようになります。ただし各<>と<>の間の区切りはスペースを表すこととします。_は半角スペース。

<mg_file> = <command> <table_name> { <table_body> }
<command> = :create
<table_name> = <ascii_string>
<ascii_string> = <ascii_char>+
<ascii_chars> = [a-zA-Z]
<space> = (\t | _)*
<space_newline> = (<space> | \n)+
<table_body> = { ((<table_opt> | <column_opt>) <space_newline>)* }
<table_opt> = <opt_name> ({ (<opt> | <column_name>)+ })?
<column_opt> = <column_name> { <opt>+ }
<column_name> = <ascii_string>
<opt> = <opt_name> (<opt_val> <space>)* <space_newline>
<opt_name> = :<ascii_string>
<opt_val> = <String> | <Integer> | <Double> | <Y-m-d> | <Time> | <Date_Time>
<String> = " .* "
<Sign> = + | -
<Integer> = <Sign>?(0 | [1-9][0-9]*)
<Double> = <Sign>?(0.[0-9]* |[1-9][0-9]*.[0-9]*)
<Y-m-d'>= (0 | [1-9][0-9]*)-[1-12]-[1-31]
<Y-m-d> ="<Y-m-d'>"
<Time> = [0-23]:[0-59]:[0-59]
<Time> = "<Time'>"
<Date_Time> = "<Y-m-d'>_<Time'>"

使い方

最低限指定した場合のコマンドは次の通りです。

mig.exe -I <input-file> -O <output-file> --target <target-FW>

About

This application is converter from mig-file to migration-file of Web framework.


Languages

Language:Rust 100.0%