Skip to content

Commit c3bc41c

Browse files
committed
Remove default NULL
1 parent 228bdfd commit c3bc41c

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

tests/fixtures/blog_mysql.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ DROP TABLE IF EXISTS `categories`;
99
CREATE TABLE `categories` (
1010
`id` int(11) NOT NULL AUTO_INCREMENT,
1111
`name` varchar(255) NOT NULL,
12-
`icon` blob NULL,
12+
`icon` blob,
1313
PRIMARY KEY (`id`)
1414
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
1515

@@ -85,13 +85,13 @@ CREATE TABLE `users` (
8585
`id` int(11) NOT NULL AUTO_INCREMENT,
8686
`username` varchar(255) NOT NULL,
8787
`password` varchar(255) NOT NULL,
88-
`location` point NULL,
88+
`location` point,
8989
PRIMARY KEY (`id`)
9090
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
9191

9292
INSERT INTO `users` (`username`, `password`, `location`) VALUES
93-
('user1', 'pass1', null),
94-
('user2', 'pass2', null);
93+
('user1', 'pass1', NULL),
94+
('user2', 'pass2', NULL);
9595

9696
DROP TABLE IF EXISTS `countries`;
9797
CREATE TABLE `countries` (
@@ -127,7 +127,7 @@ CREATE TABLE `products` (
127127
`price` decimal(10,2) NOT NULL,
128128
`properties` longtext NOT NULL,
129129
`created_at` datetime NOT NULL,
130-
`deleted_at` datetime NULL,
130+
`deleted_at` datetime,
131131
PRIMARY KEY (`id`)
132132
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
133133

tests/fixtures/blog_pgsql.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ CREATE TABLE users (
9898
id serial NOT NULL,
9999
username character varying(255) NOT NULL,
100100
password character varying(255) NOT NULL,
101-
location geometry NULL
101+
location geometry
102102
);
103103

104104
--
@@ -118,8 +118,8 @@ CREATE TABLE countries (
118118
CREATE TABLE events (
119119
id serial NOT NULL,
120120
name character varying(255) NOT NULL,
121-
datetime timestamp NULL,
122-
visitors bigint NULL
121+
datetime timestamp,
122+
visitors bigint
123123
);
124124

125125
--

tests/fixtures/blog_sqlsrv.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ GO
133133
CREATE TABLE [categories](
134134
[id] [int] IDENTITY,
135135
[name] [nvarchar](255) NOT NULL,
136-
[icon] [image] NULL,
136+
[icon] [image],
137137
PRIMARY KEY CLUSTERED([id] ASC)
138138
)
139139
GO
@@ -175,7 +175,7 @@ CREATE TABLE [users](
175175
[id] [int] IDENTITY,
176176
[username] [nvarchar](255) NOT NULL,
177177
[password] [nvarchar](255) NOT NULL,
178-
[location] [geometry] NULL,
178+
[location] [geometry],
179179
CONSTRAINT [PK_users]
180180
PRIMARY KEY CLUSTERED([id] ASC)
181181
)
@@ -193,8 +193,8 @@ GO
193193
CREATE TABLE [events](
194194
[id] [int] IDENTITY,
195195
[name] [nvarchar](255) NOT NULL,
196-
[datetime] [datetime2](0) NULL,
197-
[visitors] [bigint] NULL,
196+
[datetime] [datetime2](0),
197+
[visitors] [bigint],
198198
CONSTRAINT [PK_events]
199199
PRIMARY KEY CLUSTERED([id] ASC)
200200
)
@@ -211,7 +211,7 @@ CREATE TABLE [products](
211211
[price] [decimal](10,2) NOT NULL,
212212
[properties] [xml] NOT NULL,
213213
[created_at] [datetime2](0) NOT NULL,
214-
[deleted_at] [datetime2](0) NULL,
214+
[deleted_at] [datetime2](0),
215215
CONSTRAINT [PK_products]
216216
PRIMARY KEY CLUSTERED([id] ASC)
217217
)

0 commit comments

Comments
 (0)