Kevin
ac3ec858a6
Edit DB.clone(), DB.Dialect(), and Scope.Dialect() preserve transactions ( #1939 )
...
* Edit DB.clone(), DB.Dialect(), and Scope.Dialect() preserve transactions.
* Adds a test case for tables creations and autoMigrate in the same transaction.
2018-07-27 07:35:53 +08:00
Jinzhu
7a8c2bbff8
Refactor build SQL condition
2018-02-12 00:06:31 +08:00
Viktor Nikolaiev
fce49136e8
fixed golint issues
2018-02-11 09:19:57 +08:00
Viktor Nikolaiev
3b6d790e93
Made it possible to implement driver.Valuer for byte slices
2018-02-11 09:19:57 +08:00
Jinzhu
89a726ce5d
Move ModifyColumn implemention to Dialect
2018-02-09 22:58:34 +08:00
Horacio Duran
3a9e91ab37
Correct ModifyColumn SQL syntax. ( #1614 )
...
* Correct ModifyColumn SQL syntax.
The generated SQL for ModifyColumn was:
`ALTER TABLE "tablename" MODIFY "columname" type`
But should have been:
`ALTER TABLE "tablename" ALTER COLUMN "columname" TYPE type`
since Modify does not seem to be entirely compatible with all Engines
* Test ModifyColumn
* Skip ModifyColumnType test on incompatible DBs
Some DB Engines don't fully support alter table so we skip
when the dialect does not correspond to one of the ones that
are known to support it.
2017-09-28 22:48:21 +08:00
Jinzhu
5730b92954
Fix tests with mssql
2017-03-22 23:50:42 +08:00
Jinzhu
e4b130d2d7
Fix customize DeletedAt's column name
2017-02-01 21:33:36 +08:00
Jinzhu
a667ab8427
Fix Replace has one/many associations
2016-10-20 13:27:26 +08:00
Jinzhu
5d853fc53c
Fix null time not allowed in mysql5.7 test error
2016-10-19 12:20:45 +08:00
slockij
1413e55339
Add named value for PolymorphicType (to replace scope.TableName)
2016-09-28 22:44:43 +02:00
Jinzhu
446ce99a42
Support set prefix for embedded struct
2016-09-05 22:26:57 +08:00
Jinzhu
f26fa242cc
Support specify GORM tag setting inside scanner
2016-08-25 17:59:26 +08:00
elgris
fb09befb9b
Adds processing of ignored fields on Update
2016-08-14 16:12:57 +08:00
Christophe de Vienne
608fd976c4
Fix auto_increment on postgres database.
2016-06-20 15:00:19 +02:00
Jinzhu
61f50a429a
Fix preload has one relations
2016-06-16 17:58:25 +08:00
Michael Goff
e7f00bd2cd
Add support for multiple indexes seperated by commas for issue #884
2016-06-15 16:06:22 -07:00
Nikola Kovacs
7983fc6269
fix panic in AddForeignKey on mysql dialect
2016-05-22 09:58:37 +02:00
Nikola Kovacs
6eb73ae654
Fix too long foreign key names in mysql.
...
The dialect must define its own foreign key generator method.
The previous default is available as a method on gorm.DefaultForeignKeyNamer
and can be embedded in other dialects.
The mysql dialect uses the first 24 characters plus an sha1 hash of the
full key name if the key name is more than 64 characters.
2016-05-22 00:13:26 +02:00
Nikola Kovacs
ed9cfac496
add failing test for long foreign keys in mysql
2016-05-21 19:12:02 +02:00
Jinzhu
7c43d9fc36
Fix scan columns with same name
2016-03-10 17:35:19 +08:00
Jinzhu
d08894cd69
Rename test files
2016-03-08 22:00:15 +08:00
Jinzhu
4e8370e18b
Refactor dialect
2016-02-15 14:59:15 +08:00
Jinzhu
b59eaf526e
Set Error to Association when some error happend
2016-01-03 17:52:16 +08:00
Jinzhu
e65f94b287
Fix association Append for polymorphic
2015-12-26 15:20:40 +08:00
Jinzhu
9ed070d386
Fix tests on CI
2015-12-26 14:00:18 +08:00
Jinzhu
6fed43162f
Create Indexes with AutoMigrate
2015-03-09 17:22:16 +08:00
Jinzhu
34997385b0
Add HasIndex method for dialect interface
2015-03-02 23:02:40 +08:00
Jinzhu
4e8d43dd4f
Refactor check HasTable, HasColumn
2015-02-28 17:01:27 +08:00
Paolo Galeone
0fa1335555
Avoid Errors in postgres when creating a row without a GORM defined primary key (but defined db-side)
2014-12-08 11:33:30 +01:00
Jinzhu
a7e63541fd
Fix migration tests
2014-11-25 14:41:09 +08:00
Jinzhu
f984bc8515
Refact code
2014-08-30 21:42:35 +08:00
Jinzhu
d806b7084f
Pass anonymous struct tests
2014-08-30 21:42:35 +08:00
Jinzhu
b2360c11da
Add Fields for embedded struct
2014-08-30 21:42:35 +08:00
Jinzhu
423d9496c1
update tests
2014-08-28 16:14:44 +08:00
Jinzhu
14fdbdd965
AutoMigrate accepts structs
2014-08-20 11:56:39 +08:00
Jinzhu
e1e68debdc
improve association
2014-07-30 20:48:36 +08:00
Jinzhu
efd3b7678b
Be able to find many to many relations
2014-07-30 16:22:26 +08:00
Jinzhu
2bffb43138
Write stub code for Many2Many
2014-07-29 17:28:10 +08:00
Jinzhu
62fd13e04e
Refact tests
2014-07-29 16:25:38 +08:00
Jinzhu
468e54f0ee
Refact tests
2014-07-29 16:04:40 +08:00
Jinzhu
b929a082d7
Fix remove index for sqlite and postgres
2014-07-29 12:02:03 +08:00
Jinzhu
cb7d545ac0
Refact tests
2014-07-29 11:38:28 +08:00