summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-11-25 10:17:57 +0000
committeralecpl <alec@alec.pl>2008-11-25 10:17:57 +0000
commitdebdda011717e63945a0f6a9db6ab77b30a47079 (patch)
tree275bbcbd12446a28c387ba9fd68e7daa76c4fd85
parent938e96a3e594cd96612eba53e6c81fb39b74017e (diff)
#1485420: remove default (and not null) for users.language column in DDL
-rw-r--r--SQL/mssql.initial.sql3
-rw-r--r--SQL/mysql.initial.sql2
-rw-r--r--SQL/mysql.update.sql3
-rw-r--r--SQL/mysql5.initial.sql2
-rw-r--r--SQL/postgres.initial.sql2
-rw-r--r--SQL/postgres.update.sql3
-rw-r--r--SQL/sqlite.initial.sql2
7 files changed, 11 insertions, 6 deletions
diff --git a/SQL/mssql.initial.sql b/SQL/mssql.initial.sql
index 98412de2b..1814701a7 100644
--- a/SQL/mssql.initial.sql
+++ b/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]
diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql
index 4fa6a003a..5b2bb8a5f 100644
--- a/SQL/mysql.initial.sql
+++ b/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`),
diff --git a/SQL/mysql.update.sql b/SQL/mysql.update.sql
index 74ff5330f..5590099d0 100644
--- a/SQL/mysql.update.sql
+++ b/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);
diff --git a/SQL/mysql5.initial.sql b/SQL/mysql5.initial.sql
index 54dee1dba..8c6b1e009 100644
--- a/SQL/mysql5.initial.sql
+++ b/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`),
diff --git a/SQL/postgres.initial.sql b/SQL/postgres.initial.sql
index b5f7779d7..d2e56980b 100644
--- a/SQL/postgres.initial.sql
+++ b/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
);
diff --git a/SQL/postgres.update.sql b/SQL/postgres.update.sql
index 14fdc9753..5dae5a28a 100644
--- a/SQL/postgres.update.sql
+++ b/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;
diff --git a/SQL/sqlite.initial.sql b/SQL/sqlite.initial.sql
index e89f0d16a..5120ea0b7 100644
--- a/SQL/sqlite.initial.sql
+++ b/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 ''
);