Browse Source

[sql] ajout de la colonne pad_url, modification de la colonne content pour accepter NULL

TODO: Appliquer le patch sql/patches/mysql/01-pad_url.sql sur les db
existantes
Maxime Alves LIRMM@home 3 years ago
parent
commit
e651ebe447
2 changed files with 14 additions and 3 deletions
  1. 5
    3
      sql/mysql.sql
  2. 9
    0
      sql/patches/mysql/01-pad_url.sql

+ 5
- 3
sql/mysql.sql View File

@@ -22,10 +22,11 @@ create table pages (
22 22
 	lang varchar(16) not null,
23 23
 	slug varchar(128) not null,
24 24
 	title varchar(256) not null,
25
-	content text not null,
25
+	content text null,
26 26
 	sidebar text not null,
27 27
 	users_only integer not null,
28
-	constraint unique (lang,slug)
28
+	constraint unique (lang,slug),
29
+	pad_url varchar(256) null
29 30
 ) Engine = InnoDB;
30 31
 
31 32
 create table history (
@@ -34,9 +35,10 @@ create table history (
34 35
 	created datetime not null,
35 36
 	author varchar(32) not null,
36 37
 	title varchar(256) not null,
37
-	content text not null,
38
+	content text null,
38 39
 	sidebar text not null,
39 40
 	constraint unique(id,version),
41
+	pad_url varchar(256) null,
40 42
 	foreign key(id) references pages(id),
41 43
 	primary key(id,version)
42 44
 ) Engine = InnoDB;

+ 9
- 0
sql/patches/mysql/01-pad_url.sql View File

@@ -0,0 +1,9 @@
1
+alter table pages
2
+add column pad_url varchar(256) null;
3
+alter table pages
4
+modify column content text null;
5
+
6
+alter table history
7
+add column pad_url varchar(256) null;
8
+alter table history
9
+modify column content text null;

Loading…
Cancel
Save