File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 47
47
- Enh #368 : Provide ` yiisoft/db-implementation ` virtual package (@vjik )
48
48
- Enh #371 , #374 : Adapt to conditions refactoring in ` yiisoft/db ` package (@vjik )
49
49
- Enh #377 : Remove ` TableSchema ` class and refactor ` Schema ` class (@Tigrov )
50
+ - Enh #380 : Support column's collation (@Tigrov )
50
51
51
52
## 1.2.0 March 21, 2024
52
53
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ public function build(ColumnInterface $column): string
53
53
. $ this ->buildNotNull ($ column )
54
54
. $ this ->buildDefault ($ column )
55
55
. $ this ->buildCheck ($ column )
56
+ . $ this ->buildCollate ($ column )
56
57
. $ this ->buildReferences ($ column )
57
58
. $ this ->buildExtra ($ column )
58
59
. $ this ->buildComment ($ column );
Original file line number Diff line number Diff line change 10
10
use Yiisoft \Db \Expression \Expression ;
11
11
use Yiisoft \Db \Query \Query ;
12
12
use Yiisoft \Db \QueryBuilder \Condition \In ;
13
+ use Yiisoft \Db \Sqlite \Column \ColumnBuilder ;
13
14
use Yiisoft \Db \Sqlite \Tests \Support \TestTrait ;
14
15
use Yiisoft \Db \Tests \Support \TraversableObject ;
15
16
@@ -379,6 +380,10 @@ public static function buildColumnDefinition(): array
379
380
$ values ['binary() ' ][0 ] = 'blob ' ;
380
381
$ values ['binary(1000) ' ][0 ] = 'blob(1000) ' ;
381
382
$ values ['uuid() ' ][0 ] = 'blob(16) ' ;
383
+ $ values ["collation('collation_name') " ] = [
384
+ 'varchar(255) COLLATE RTRIM ' ,
385
+ ColumnBuilder::string ()->collation ('RTRIM ' ),
386
+ ];
382
387
$ values ["comment('comment') " ][0 ] = 'varchar(255) /* comment */ ' ;
383
388
$ values ['integer()->primaryKey() ' ][0 ] = 'integer PRIMARY KEY NOT NULL ' ;
384
389
$ values ['string()->primaryKey() ' ][0 ] = 'varchar(255) PRIMARY KEY NOT NULL ' ;
You can’t perform that action at this time.
0 commit comments