1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 14:50:55 +00:00
Commit Graph

12 Commits

Author SHA1 Message Date
JessonChan
95ff817019 undefined: beego.BeeLogger fixed 2019-03-13 09:41:13 +08:00
Medicean
cf92d2c6ef Update: Fix migration generate SQL 2018-01-04 10:42:39 +08:00
astaxie
4fc95b0d69 gofmt and golint 2017-07-19 00:52:27 +08:00
Gnanakeethan Balasubramaniam
8bb0a70847
Update: Fix in SQL Generation
Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@gmail.com>
2017-07-16 08:48:44 +05:30
Gnanakeethan Balasubramaniam
cb38ab4f85
Update: fixing a SQL generation code
Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@gmail.com>
2017-07-16 07:10:09 +05:30
Gnanakeethan Balasubramaniam
7c2ec075a4
Update: fixing some methods and adding documentation
Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@gmail.com>
2017-07-13 21:03:30 +05:30
Gnanakeethan Balasubramaniam
e888fee4e0
Update: Foreign Key & Comments
Summary: Foreign Key functions are now available

Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@gmail.com>
2017-07-06 20:26:37 +05:30
Gnanakeethan Balasubramaniam
c1ba11f531
Fixing typo
Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@gmail.com>
2017-07-06 14:58:40 +05:30
Gnanakeethan Balasubramaniam
ed558a0e70
Fix: typo due to find and replace migration renamed to m
Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@gmail.com>
2017-07-06 07:45:07 +05:30
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
astaxie
542e143e55 golint migration 2015-09-11 23:16:05 +08:00
astaxie
945b1da3a8 fix the gofmt 2014-10-31 15:48:57 +08:00