fix diff for altering two things per column - add ; at the end
[dbsrgits/SQL-Translator.git] / t / data / diff / create2.yml
1 ---
2 schema:
3   procedures: {}
4   tables:
5     added:
6       constraints: []
7       fields:
8         id:
9           data_type: int
10           default_value: ~
11           extra: {}
12           is_nullable: 1
13           is_primary_key: 0
14           is_unique: 0
15           name: id
16           order: 1
17           size:
18             - 11
19       indices: []
20       name: added
21       options: []
22       order: 3
23     employee:
24       constraints:
25         - deferrable: 1
26           expression: ''
27           fields:
28             - employee_id
29           match_type: ''
30           name: FK5302D47D93FE702E_diff
31           on_delete: ''
32           on_update: ''
33           options: []
34           reference_fields:
35             - person_id
36           reference_table: person
37           type: FOREIGN KEY
38         - deferrable: 1
39           expression: ''
40           fields:
41             - employee_id
42             - position
43           match_type: ''
44           name: ''
45           on_delete: ''
46           on_update: ''
47           options: []
48           reference_fields: []
49           reference_table: ''
50           type: PRIMARY KEY
51       fields:
52         employee_id:
53           data_type: int
54           default_value: ~
55           extra: {}
56           is_nullable: 1
57           is_primary_key: 1
58           is_unique: 0
59           name: employee_id
60           order: 2
61           size:
62             - 11
63         position:
64           data_type: varchar
65           default_value: ~
66           extra: {}
67           is_nullable: 0
68           is_primary_key: 1
69           is_unique: 0
70           name: position
71           order: 1
72           size:
73             - 50
74       indices: []
75       name: employee
76       options:
77         - ENGINE: InnoDB
78       order: 2
79     new_name:
80       name: new_name
81       extra:
82         renamed_from: old_name
83       fields:
84         pk:
85           data_type: int
86           default_value: ~
87           extra: {}
88           is_auto_increment: 1
89           is_nullable: 0
90           is_primary_key: 1
91           is_unique: 1
92           name: pk
93           order: 1
94         other:
95           data_type: int
96           name: new_field
97           order: 2
98       order: 4
99     person:
100       constraints:
101         - deferrable: 1
102           expression: ''
103           fields:
104             - person_id
105           match_type: ''
106           name: ''
107           on_delete: ''
108           on_update: ''
109           options: []
110           reference_fields: []
111           reference_table: ''
112           type: PRIMARY KEY
113         - deferrable: 1
114           expression: ''
115           fields:
116             - person_id
117           match_type: ''
118           name: UC_person_id
119           on_delete: ''
120           on_update: ''
121           options: []
122           reference_fields: []
123           reference_table: ''
124           type: UNIQUE
125         - deferrable: 1
126           expression: ''
127           fields:
128             - age
129             - name
130           match_type: ''
131           name: UC_age_name
132           on_delete: ''
133           on_update: ''
134           options: []
135           reference_fields: []
136           reference_table: ''
137           type: UNIQUE
138       fields:
139         age:
140           data_type: int
141           default_value: 18
142           extra: {}
143           is_nullable: 1
144           is_primary_key: 0
145           is_unique: 1
146           name: age
147           order: 3
148           size:
149             - 11
150         iq:
151           data_type: int
152           default_value: 0
153           extra: {}
154           is_nullable: 1
155           is_primary_key: 0
156           is_unique: 0
157           name: iq
158           order: 5
159           size:
160             - 11
161         is_rock_star:
162           data_type: tinyint
163           default_value: 1
164           extra: {}
165           is_nullable: 1
166           is_primary_key: 0
167           is_unique: 0
168           name: is_rock_star
169           order: 6
170           size:
171             - 4
172         name:
173           data_type: varchar
174           default_value: ~
175           extra: {}
176           is_nullable: 0
177           is_primary_key: 0
178           is_unique: 1
179           name: name
180           order: 2
181           size:
182             - 20
183         person_id:
184           data_type: int
185           default_value: ~
186           extra: {}
187           is_auto_increment: 1
188           is_nullable: 0
189           is_primary_key: 1
190           is_unique: 1
191           name: person_id
192           order: 1
193           size:
194             - 11
195         physical_description:
196           data_type: text
197           default_value: ~
198           extra:
199             renamed_from: 'description'
200           is_nullable: 1
201           is_primary_key: 0
202           is_unique: 0
203           name: physical_description
204           order: 7
205           size:
206             - 65535
207         weight:
208           data_type: double
209           default_value: ~
210           extra: {}
211           is_nullable: 1
212           is_primary_key: 0
213           is_unique: 0
214           name: weight
215           order: 4
216           size:
217             - 11
218             - 2
219       indices:
220         - fields:
221             - name
222           name: unique_name
223           options: []
224           type: UNIQUE
225       name: person
226       options:
227         - ENGINE: InnoDB
228       order: 1
229   triggers: {}
230   views: {}
231 translator:
232   add_drop_table: 0
233   filename: t/data/mysql/create2.sql
234   no_comments: 0
235   parser_args:
236     db_password: ~
237     db_user: ~
238     dsn: ~
239     field_separator: ~
240     mysql_parser_version: ~
241     record_separator: ~
242     scan_fields: 1
243     trim_fields: 1
244   parser_type: SQL::Translator::Parser::MySQL
245   producer_args:
246     add_prefix: ~
247     add_truncate: ~
248     db_password: ~
249     db_user: ~
250     dsn: ~
251     imap_file: ~
252     imap_url: ~
253     indent: ~
254     newlines: ~
255     package_name: ~
256     prefix: ~
257     pretty: ~
258     skip: ~
259     skiplike: ~
260     title: ~
261     tt_conf: {}
262     tt_vars: {}
263     ttfile: ~
264   producer_type: SQL::Translator::Producer::YAML
265   show_warnings: 0
266   trace: 0
267   version: 0.0899_01