1
0
mirror of https://github.com/beego/bee.git synced 2024-11-25 20:10:55 +00:00

Merge pull request #101 from nishantmodak/patch-1

Syntax Fix for example usage
This commit is contained in:
astaxie 2015-02-23 21:56:32 +08:00
commit 7f313ac0eb

View File

@ -115,7 +115,7 @@ usage: bee api [appname]
create an api application base on beego framework create an api application base on beego framework
bee api [appname] [-tables=""] [-driver=mysql] [-conn=root:@tcp(127.0.0.1:3306)/test] bee api [appname] [-tables=""] [-driver="mysql"] [-conn="root:@tcp(127.0.0.1:3306)/test"]
-tables: a list of table names separated by ',', default is empty, indicating all tables -tables: a list of table names separated by ',', default is empty, indicating all tables
-driver: [mysql | postgres | sqlite], the default is mysql -driver: [mysql | postgres | sqlite], the default is mysql
-conn: the connection string used by the driver, the default is '' -conn: the connection string used by the driver, the default is ''
@ -162,22 +162,22 @@ This is mainly used for zealots who are requiring 100% Go code.
```bash ```bash
usage: bee migrate [Command] usage: bee migrate [Command]
bee migrate [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"] bee migrate [-driver="mysql"] [-conn="root:@tcp(127.0.0.1:3306)/test"]
run all outstanding migrations run all outstanding migrations
-driver: [mysql | postgresql | sqlite], the default is mysql -driver: [mysql | postgresql | sqlite], the default is mysql
-conn: the connection string used by the driver, the default is root:@tcp(127.0.0.1:3306)/test -conn: the connection string used by the driver, the default is root:@tcp(127.0.0.1:3306)/test
bee migrate rollback [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"] bee migrate rollback [-driver="mysql"] [-conn="root:@tcp(127.0.0.1:3306)/test"]
rollback the last migration operation rollback the last migration operation
-driver: [mysql | postgresql | sqlite], the default is mysql -driver: [mysql | postgresql | sqlite], the default is mysql
-conn: the connection string used by the driver, the default is root:@tcp(127.0.0.1:3306)/test -conn: the connection string used by the driver, the default is root:@tcp(127.0.0.1:3306)/test
bee migrate reset [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"] bee migrate reset [-driver="mysql"] [-conn="root:@tcp(127.0.0.1:3306)/test"]
rollback all migrations rollback all migrations
-driver: [mysql | postgresql | sqlite], the default is mysql -driver: [mysql | postgresql | sqlite], the default is mysql
-conn: the connection string used by the driver, the default is root:@tcp(127.0.0.1:3306)/test -conn: the connection string used by the driver, the default is root:@tcp(127.0.0.1:3306)/test
bee migrate refresh [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"] bee migrate refresh [-driver="mysql"] [-conn="root:@tcp(127.0.0.1:3306)/test"]
rollback all migrations and run them all again rollback all migrations and run them all again
-driver: [mysql | postgresql | sqlite], the default is mysql -driver: [mysql | postgresql | sqlite], the default is mysql
-conn: the connection string used by the driver, the default is root:@tcp(127.0.0.1:3306)/test -conn: the connection string used by the driver, the default is root:@tcp(127.0.0.1:3306)/test
@ -191,7 +191,7 @@ Bee also comes with a souce code generator which speeds up the development.
```bash ```bash
usage: bee generate [Command] usage: bee generate [Command]
bee generate scaffold [scaffoldname] [-fields=""] [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"] bee generate scaffold [scaffoldname] [-fields=""] [-driver="mysql"] [-conn="root:@tcp(127.0.0.1:3306)/test"]
The generate scaffold command will do a number of things for you. The generate scaffold command will do a number of things for you.
-fields: a list of table fields. Format: field:type, ... -fields: a list of table fields. Format: field:type, ...
-driver: [mysql | postgres | sqlite], the default is mysql -driver: [mysql | postgres | sqlite], the default is mysql
@ -218,7 +218,7 @@ bee generate docs
bee generate test [routerfile] bee generate test [routerfile]
generate testcase generate testcase
bee generate appcode [-tables=""] [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"] [-level=3] bee generate appcode [-tables=""] [-driver="mysql"] [-conn="root:@tcp(127.0.0.1:3306)/test"] [-level=3]
generate appcode based on an existing database generate appcode based on an existing database
-tables: a list of table names separated by ',', default is empty, indicating all tables -tables: a list of table names separated by ',', default is empty, indicating all tables
-driver: [mysql | postgres | sqlite], the default is mysql -driver: [mysql | postgres | sqlite], the default is mysql
@ -271,4 +271,4 @@ when the file has changed bee will auto go build and restart the app
| |
restart app restart app
``` ```