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

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

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