Revision c21db653
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
sql/Pg-upgrade2/column_type_text_instead_of_varchar.sql | ||
---|---|---|
1 |
-- @tag: column_type_text_instead_of_varchar |
|
2 |
-- @description: Spaltentyp auf Text anstelle von varchar() für diverse Spalten |
|
3 |
-- @depends: release_3_1_0 |
|
4 |
|
|
5 |
-- contacts |
|
6 |
ALTER TABLE contacts |
|
7 |
ALTER COLUMN cp_givenname TYPE TEXT |
|
8 |
, ALTER COLUMN cp_title TYPE TEXT |
|
9 |
, ALTER COLUMN cp_name TYPE TEXT |
|
10 |
, ALTER COLUMN cp_phone1 TYPE TEXT |
|
11 |
, ALTER COLUMN cp_phone2 TYPE TEXT |
|
12 |
, ALTER COLUMN cp_position TYPE TEXT |
|
13 |
; |
|
14 |
|
|
15 |
-- customer |
|
16 |
ALTER TABLE customer |
|
17 |
ALTER COLUMN bic TYPE TEXT |
|
18 |
, ALTER COLUMN city TYPE TEXT |
|
19 |
, ALTER COLUMN country TYPE TEXT |
|
20 |
, ALTER COLUMN department_1 TYPE TEXT |
|
21 |
, ALTER COLUMN department_2 TYPE TEXT |
|
22 |
, ALTER COLUMN fax TYPE TEXT |
|
23 |
, ALTER COLUMN iban TYPE TEXT |
|
24 |
, ALTER COLUMN language TYPE TEXT |
|
25 |
, ALTER COLUMN street TYPE TEXT |
|
26 |
, ALTER COLUMN username TYPE TEXT |
|
27 |
, ALTER COLUMN zipcode TYPE TEXT |
|
28 |
; |
|
29 |
|
|
30 |
-- vendor |
|
31 |
ALTER TABLE vendor |
|
32 |
ALTER COLUMN bic TYPE TEXT |
|
33 |
, ALTER COLUMN city TYPE TEXT |
|
34 |
, ALTER COLUMN country TYPE TEXT |
|
35 |
, ALTER COLUMN department_1 TYPE TEXT |
|
36 |
, ALTER COLUMN department_2 TYPE TEXT |
|
37 |
, ALTER COLUMN fax TYPE TEXT |
|
38 |
, ALTER COLUMN iban TYPE TEXT |
|
39 |
, ALTER COLUMN street TYPE TEXT |
|
40 |
, ALTER COLUMN user_password TYPE TEXT |
|
41 |
, ALTER COLUMN username TYPE TEXT |
|
42 |
, ALTER COLUMN zipcode TYPE TEXT |
|
43 |
; |
Auch abrufbar als: Unified diff
Spaltentyp Text anstelle von varchar() in diversen Tabellen