1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-27 12:05:46 +00:00
Commit Graph

35 Commits

Author SHA1 Message Date
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
94e79eddcf
Update: removing remnant of revert commit ( a call to function
m.DDLSpec() )

Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@gmail.com>
2017-07-16 08:37:27 +05:30
Gnanakeethan Balasubramaniam
749a4028b4
Revert "Update: removing the need to call DDLSpec in the migration file"
The odds of getting this perfectly up is not good.

This reverts commit d58ad2ee36.
2017-07-16 08:11:10 +05:30
Gnanakeethan Balasubramaniam
fc55c2b57c
Update: missed to call DDLSpec in Down migration
Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@gmail.com>
2017-07-16 07:30:53 +05:30
Gnanakeethan Balasubramaniam
d58ad2ee36
Update: removing the need to call DDLSpec in the migration file
Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@gmail.com>
2017-07-16 07:24:58 +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
d453242e48
Update: moving package to bottom
Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@gmail.com>
2017-07-14 14:42:56 +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
JessonChan
2db8c753fd bee fix 2016-03-25 10:56:15 +08:00
Steeve Chailloux
29ac961c10 fix postgres syntax error during migration 2015-11-18 06:46:44 -06:00
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
astaxie
a144769515 update the documents & comments 2014-08-18 16:41:43 +08:00
astaxie
564c3bbeb5 migration: update the debug error 2014-08-14 13:44:05 +08:00
astaxie
31f0ac4ce3 migration: update the params orders 2014-08-14 13:41:54 +08:00
astaxie
57a9670b0a migration: reset the up state sql 2014-08-14 13:37:48 +08:00
astaxie
14cd9e51ac revert the sort map for reset 2014-08-14 11:54:15 +08:00
astaxie
886bb782a5 sort the reset 2014-08-14 11:44:10 +08:00
astaxie
d2119f715c update the migrations 2014-08-14 11:39:59 +08:00
astaxie
f98b1810ab update the reset 2014-08-14 10:56:49 +08:00
astaxie
55a7711017 migration: skip reset 2014-08-14 10:19:55 +08:00
astaxie
ae37f95239 migration: delete the unique key for name 2014-08-13 16:42:16 +08:00
Zheng Yang
32469cd69d change time format 2014-08-13 16:09:13 +08:00
astaxie
e572f45296 update the error output 2014-08-13 14:50:32 +08:00
astaxie
efcaa3d934 update the migration database time format 2014-08-13 11:16:19 +08:00
astaxie
5ecfe0c335 beego hook change the path & fix the migration bug 2014-08-13 10:43:05 +08:00
astaxie
d325a66fee update the error info 2014-08-12 16:35:59 +08:00
astaxie
fe9017c819 update the description 2014-08-12 15:50:28 +08:00
astaxie
b97279a74f update the migration 2014-08-12 15:49:30 +08:00
astaxie
1f6c5599aa migration: version 1 2014-08-07 16:30:28 +08:00