Browse Source

Remove default NULL

Maurits van der Schee 6 years ago
parent
commit
c3bc41c168
3 changed files with 13 additions and 13 deletions
  1. 5
    5
      tests/fixtures/blog_mysql.sql
  2. 3
    3
      tests/fixtures/blog_pgsql.sql
  3. 5
    5
      tests/fixtures/blog_sqlsrv.sql

+ 5
- 5
tests/fixtures/blog_mysql.sql View File

@@ -9,7 +9,7 @@ DROP TABLE IF EXISTS `categories`;
9 9
 CREATE TABLE `categories` (
10 10
   `id` int(11) NOT NULL AUTO_INCREMENT,
11 11
   `name` varchar(255) NOT NULL,
12
-  `icon` blob NULL,
12
+  `icon` blob,
13 13
   PRIMARY KEY (`id`)
14 14
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
15 15
 
@@ -85,13 +85,13 @@ CREATE TABLE `users` (
85 85
   `id` int(11) NOT NULL AUTO_INCREMENT,
86 86
   `username` varchar(255) NOT NULL,
87 87
   `password` varchar(255) NOT NULL,
88
-  `location` point NULL,
88
+  `location` point,
89 89
   PRIMARY KEY (`id`)
90 90
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
91 91
 
92 92
 INSERT INTO `users` (`username`, `password`, `location`) VALUES
93
-('user1',	'pass1', null),
94
-('user2',	'pass2', null);
93
+('user1',	'pass1', NULL),
94
+('user2',	'pass2', NULL);
95 95
 
96 96
 DROP TABLE IF EXISTS `countries`;
97 97
 CREATE TABLE `countries` (
@@ -127,7 +127,7 @@ CREATE TABLE `products` (
127 127
   `price` decimal(10,2) NOT NULL,
128 128
   `properties` longtext NOT NULL,
129 129
   `created_at` datetime NOT NULL,
130
-  `deleted_at` datetime NULL,
130
+  `deleted_at` datetime,
131 131
   PRIMARY KEY (`id`)
132 132
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
133 133
 

+ 3
- 3
tests/fixtures/blog_pgsql.sql View File

@@ -98,7 +98,7 @@ CREATE TABLE users (
98 98
     id serial NOT NULL,
99 99
     username character varying(255) NOT NULL,
100 100
     password character varying(255) NOT NULL,
101
-    location geometry NULL
101
+    location geometry
102 102
 );
103 103
 
104 104
 --
@@ -118,8 +118,8 @@ CREATE TABLE countries (
118 118
 CREATE TABLE events (
119 119
     id serial NOT NULL,
120 120
     name character varying(255) NOT NULL,
121
-    datetime timestamp NULL,
122
-    visitors bigint NULL
121
+    datetime timestamp,
122
+    visitors bigint
123 123
 );
124 124
 
125 125
 --

+ 5
- 5
tests/fixtures/blog_sqlsrv.sql View File

@@ -133,7 +133,7 @@ GO
133 133
 CREATE TABLE [categories](
134 134
 	[id] [int] IDENTITY,
135 135
 	[name] [nvarchar](255) NOT NULL,
136
-	[icon] [image] NULL,
136
+	[icon] [image],
137 137
 	PRIMARY KEY CLUSTERED([id] ASC)
138 138
 )
139 139
 GO
@@ -175,7 +175,7 @@ CREATE TABLE [users](
175 175
 	[id] [int] IDENTITY,
176 176
 	[username] [nvarchar](255) NOT NULL,
177 177
 	[password] [nvarchar](255) NOT NULL,
178
-	[location] [geometry] NULL,
178
+	[location] [geometry],
179 179
 	CONSTRAINT [PK_users]
180 180
 	PRIMARY KEY CLUSTERED([id] ASC)
181 181
 )
@@ -193,8 +193,8 @@ GO
193 193
 CREATE TABLE [events](
194 194
 	[id] [int] IDENTITY,
195 195
 	[name] [nvarchar](255) NOT NULL,
196
-	[datetime] [datetime2](0) NULL,
197
-	[visitors] [bigint] NULL,
196
+	[datetime] [datetime2](0),
197
+	[visitors] [bigint],
198 198
 	CONSTRAINT [PK_events]
199 199
 	PRIMARY KEY CLUSTERED([id] ASC)
200 200
 )
@@ -211,7 +211,7 @@ CREATE TABLE [products](
211 211
 	[price] [decimal](10,2) NOT NULL,
212 212
 	[properties] [xml] NOT NULL,
213 213
 	[created_at] [datetime2](0) NOT NULL,
214
-	[deleted_at] [datetime2](0) NULL,
214
+	[deleted_at] [datetime2](0),
215 215
 	CONSTRAINT [PK_products]
216 216
 	PRIMARY KEY CLUSTERED([id] ASC)
217 217
 )

Loading…
Cancel
Save