1
0
mirror of https://github.com/astaxie/beego.git synced 2025-01-22 13:07:12 +00:00
Gnanakeethan Balasubramaniam 6b9c3f4824
[Proposal] Database Migrations;
Summary: The database migrations now can be created using the methods on
the migration struct. it does not break any existing migration features.
it upgrades the migration struct and adds few more struct types so that
the migrations can be efficiently generated for create, alter, reverse,
drop.

Current Features:
* Supports creation of columns
   * `m.NewCol("name").SetDataType("VARCHAR(10)").SetNullable("true")`
   * **NOTE** `SetNullable` & `SetDefault` methods should not be called on
   same column for consistency
* Supports addition of primary keys
   * `m.PriCol("id").SetDataType("INT(10)").SetNullable("true")`
   * **NOTE** `setAuto(true)` can be only called on Primary keys
* Supports addition of unique keys
   * `m.UniCol("unique_index","column_name").SetDataType("VARCHAR(23)").SetNullable("true")`
   * **NOTE** `UniCol` can be called again with the same index name to
   add column to the index
* Supports rename of columns
   * `m.RenameColumn("from_name","to_name")`
   * Allows standard column methods and methods such that, `SetOldDefault` allows
   reversibility of renames

* TODO:
   * ForeignKey

Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@gmail.com>
2017-07-06 07:44:48 +05:30
2016-03-23 17:05:40 +08:00
2017-07-04 21:16:59 +08:00
2017-04-28 23:37:40 +08:00
2017-07-06 07:44:48 +05:30
2017-05-02 12:47:15 +08:00
2017-05-14 12:13:35 +02:00
2015-09-12 23:19:18 +08:00
2017-04-20 10:56:09 +08:00
2017-04-28 23:37:40 +08:00
2016-12-29 22:30:56 +01:00
2017-03-17 20:22:20 +02:00
2016-10-11 11:06:22 -05:00
2016-09-13 22:43:40 +08:00
2017-03-30 12:53:12 +03:00
2017-06-15 17:36:37 +08:00
2016-06-01 19:57:08 +08:00
2017-03-17 19:45:30 +02:00
2016-01-13 22:02:36 +08:00
2017-04-20 10:56:09 +08:00
2017-04-25 18:39:42 +03:00
2016-01-17 23:48:17 +08:00
2016-03-27 15:07:51 +08:00
2016-03-25 10:31:48 +08:00
2017-03-17 20:22:20 +02:00
2016-01-15 14:07:37 +08:00
2014-05-17 02:26:50 +08:00
2016-03-25 15:04:52 +08:00
2016-08-17 22:56:21 +08:00
2017-03-17 20:22:20 +02:00
2017-04-23 19:19:05 +02:00
2017-04-29 09:13:28 +08:00
2017-04-02 13:46:06 +02:00
2017-04-23 19:19:05 +02:00
2016-02-12 11:36:59 +08:00
2017-04-23 19:19:05 +02:00
2017-04-29 09:13:28 +08:00
2017-04-29 09:13:28 +08:00
2017-04-28 22:36:28 +08:00
2017-03-10 09:28:25 +08:00
2017-03-10 09:28:25 +08:00

Beego Build Status GoDoc Foundation

beego is used for rapid development of RESTful APIs, web apps and backend services in Go. It is inspired by Tornado, Sinatra and Flask. beego has some Go-specific features such as interfaces and struct embedding.

More info at beego.me.

Quick Start

Download and install

go get github.com/astaxie/beego
package main

import "github.com/astaxie/beego"

func main(){
    beego.Run()
}

Build and run

go build hello.go
./hello

Go to http://localhost:8080

Congratulations! You've just built your first beego app.

Please see Documentation for more.

Features

  • RESTful support
  • MVC architecture
  • Modularity
  • Auto API documents
  • Annotation router
  • Namespace
  • Powerful development tools
  • Full stack for Web & API

Documentation

Community

License

beego source code is licensed under the Apache Licence, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html).

Description
beego mirror
Readme 9.4 MiB
Languages
Go 99.6%
Shell 0.4%