Skip to content
Permalink
Browse files

Added fallback for json type in SQL Server

  • Loading branch information...
lorenzo committed Mar 19, 2016
1 parent b81505d commit 269bc926d967291b41777fc2053e5f7ec59bde33
@@ -310,7 +310,8 @@ public function columnSql(Table $table, $name)
'time' => ' TIME',
'datetime' => ' DATETIME',
'timestamp' => ' DATETIME',
'uuid' => ' UNIQUEIDENTIFIER'
'uuid' => ' UNIQUEIDENTIFIER',
'json' => ' NVARCHAR(MAX)',
];
if (isset($typeMap[$data['type']])) {
@@ -773,6 +773,7 @@ public function testCreateSql()
'null' => false,
])
->addColumn('body', ['type' => 'text'])
->addColumn('data', ['type' => 'json'])
->addColumn('created', 'datetime')
->addConstraint('primary', [
'type' => 'primary',
@@ -788,6 +789,7 @@ public function testCreateSql()
[id] INTEGER IDENTITY(1, 1),
[title] NVARCHAR(255) NOT NULL,
[body] NVARCHAR(MAX),
[data] NVARCHAR(MAX),
[created] DATETIME,
PRIMARY KEY ([id])
)

0 comments on commit 269bc92

Please sign in to comment.
You can’t perform that action at this time.