Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

#1485420: remove default (and not null) for users.language column in DDL

  • Loading branch information...
commit debdda011717e63945a0f6a9db6ab77b30a47079 1 parent 938e96a
@alecpl alecpl authored
View
3  SQL/mssql.initial.sql
@@ -69,7 +69,7 @@ CREATE TABLE [dbo].[users] (
[alias] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[created] [datetime] NOT NULL ,
[last_login] [datetime] NULL ,
- [language] [varchar] (5) COLLATE Latin1_General_CI_AI NOT NULL ,
+ [language] [varchar] (5) COLLATE Latin1_General_CI_AI NULL ,
[preferences] [text] COLLATE Latin1_General_CI_AI NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -202,7 +202,6 @@ ALTER TABLE [dbo].[users] ADD
CONSTRAINT [DF_users_mail_host] DEFAULT ('') FOR [mail_host],
CONSTRAINT [DF_users_alias] DEFAULT ('') FOR [alias],
CONSTRAINT [DF_users_created] DEFAULT (getdate()) FOR [created],
- CONSTRAINT [DF_users_language] DEFAULT ('en') FOR [language]
GO
CREATE INDEX [IX_users_username] ON [dbo].[users]([username]) ON [PRIMARY]
View
2  SQL/mysql.initial.sql
@@ -90,7 +90,7 @@ CREATE TABLE `users` (
`alias` varchar(128) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`last_login` datetime NOT NULL default '0000-00-00 00:00:00',
- `language` varchar(5) NOT NULL default 'en',
+ `language` varchar(5),
`preferences` text,
PRIMARY KEY (`user_id`),
INDEX `username_index` (`username`),
View
3  SQL/mysql.update.sql
@@ -41,3 +41,6 @@ ALTER TABLE `session`
ALTER TABLE `cache`
ADD INDEX `created_index` (`created`);
+
+ALTER TABLE `users`
+ CHANGE `language` `language` varchar(5);
View
2  SQL/mysql5.initial.sql
@@ -28,7 +28,7 @@ CREATE TABLE `users` (
`alias` varchar(128) NOT NULL,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_login` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `language` varchar(5) NOT NULL DEFAULT 'en',
+ `language` varchar(5),
`preferences` text,
PRIMARY KEY(`user_id`),
INDEX `username_index` (`username`),
View
2  SQL/postgres.initial.sql
@@ -21,7 +21,7 @@ CREATE TABLE users (
alias character varying(128) DEFAULT ''::character varying NOT NULL,
created timestamp with time zone DEFAULT now() NOT NULL,
last_login timestamp with time zone DEFAULT now() NOT NULL,
- "language" character varying(5) DEFAULT 'en'::character varying NOT NULL,
+ "language" character varying(5),
preferences text DEFAULT ''::text NOT NULL
);
View
3  SQL/postgres.update.sql
@@ -28,3 +28,6 @@ ALTER TABLE cache DROP session_id;
CREATE INDEX session_changed_idx ON session (changed);
CREATE INDEX cache_created_idx ON "cache" (created);
+
+ALTER TABLE users ALTER "language" DROP NOT NULL;
+ALTER TABLE users ALTER "language" DROP DEFAULT;
View
2  SQL/sqlite.initial.sql
@@ -76,7 +76,7 @@ CREATE TABLE users (
alias varchar(128) NOT NULL default '',
created datetime NOT NULL default '0000-00-00 00:00:00',
last_login datetime NOT NULL default '0000-00-00 00:00:00',
- language varchar(5) NOT NULL default 'en',
+ language varchar(5),
preferences text NOT NULL default ''
);
Please sign in to comment.
Something went wrong with that request. Please try again.