Skip to content

Commit 5a83fa1

Browse files
author
Sean Loiselle
committed
breaking out ALTER TABLE into multiple pages
1 parent 1e367de commit 5a83fa1

15 files changed

+722
-179
lines changed

_data/sidebar_doc.yml

+15
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ entries:
6363
- title: Overview
6464
url: /sql-statements.html
6565

66+
- title: <code>ADD COLUMN</code>
67+
url: /add-column.html
68+
69+
- title: <code>ADD CONSTRAINT</code>
70+
url: /add-constraint.html
71+
72+
- title: <code>ALTER COLUMN</code>
73+
url: /alter-column.html
74+
6675
- title: <code>ALTER TABLE</code>
6776
url: /alter-table.html
6877

@@ -96,6 +105,12 @@ entries:
96105
- title: <code>DELETE</code>
97106
url: /delete.html
98107

108+
- title: <code>DROP COLUMN</code>
109+
url: /drop-column.html
110+
111+
- title: <code>DROP CONSTRAINT</code>
112+
url: /drop-constraint.html
113+
99114
- title: <code>DROP DATABASE</code>
100115
url: /drop-database.html
101116

+54-50
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,58 @@
1-
<svg width="570" height="210">
1+
<svg width="884" height="210">
22

3-
<polygon points="9 17 1 13 1 21"></polygon>
4-
<polygon points="17 17 9 13 9 21"></polygon>
5-
<rect x="31" y="3" width="62" height="32" rx="10"></rect>
6-
<rect x="29" y="1" width="62" height="32" class="terminal" rx="10"></rect>
7-
<text class="terminal" x="39" y="21">ALTER</text>
8-
<rect x="113" y="3" width="62" height="32" rx="10"></rect>
9-
<rect x="111" y="1" width="62" height="32" class="terminal" rx="10"></rect>
10-
<text class="terminal" x="121" y="21">TABLE</text>
11-
<rect x="215" y="35" width="34" height="32" rx="10"></rect>
12-
<rect x="213" y="33" width="34" height="32" class="terminal" rx="10"></rect>
13-
<text class="terminal" x="223" y="53">IF</text>
14-
<rect x="269" y="35" width="68" height="32" rx="10"></rect>
15-
<rect x="267" y="33" width="68" height="32" class="terminal" rx="10"></rect>
16-
<text class="terminal" x="277" y="53">EXISTS</text>
17-
<a xlink:href="sql-grammar.html#relation_expr" xlink:title="relation_expr">
18-
<rect x="377" y="3" width="104" height="32"></rect>
19-
<rect x="375" y="1" width="104" height="32" class="nonterminal"></rect>
20-
<text class="nonterminal" x="385" y="21">relation_expr</text>
3+
<polygon points="11 17 3 13 3 21"></polygon>
4+
<polygon points="19 17 11 13 11 21"></polygon>
5+
<rect x="33" y="3" width="62" height="32" rx="10"></rect>
6+
<rect x="31" y="1" width="62" height="32" class="terminal" rx="10"></rect>
7+
<text class="terminal" x="41" y="21">ALTER</text>
8+
<rect x="115" y="3" width="62" height="32" rx="10"></rect>
9+
<rect x="113" y="1" width="62" height="32" class="terminal" rx="10"></rect>
10+
<text class="terminal" x="123" y="21">TABLE</text>
11+
<rect x="217" y="35" width="34" height="32" rx="10"></rect>
12+
<rect x="215" y="33" width="34" height="32" class="terminal" rx="10"></rect>
13+
<text class="terminal" x="225" y="53">IF</text>
14+
<rect x="271" y="35" width="68" height="32" rx="10"></rect>
15+
<rect x="269" y="33" width="68" height="32" class="terminal" rx="10"></rect>
16+
<text class="terminal" x="279" y="53">EXISTS</text>
17+
18+
<rect x="379" y="3" width="94" height="32"></rect>
19+
<rect x="377" y="1" width="94" height="32" class="nonterminal"></rect>
20+
<text class="nonterminal" x="387" y="21">table_name</text>
21+
22+
<rect x="45" y="145" width="48" height="32" rx="10"></rect>
23+
<rect x="43" y="143" width="48" height="32" class="terminal" rx="10"></rect>
24+
<text class="terminal" x="53" y="163">ADD</text>
25+
<rect x="133" y="177" width="78" height="32" rx="10"></rect>
26+
<rect x="131" y="175" width="78" height="32" class="terminal" rx="10"></rect>
27+
<text class="terminal" x="141" y="195">COLUMN</text>
28+
<rect x="271" y="177" width="34" height="32" rx="10"></rect>
29+
<rect x="269" y="175" width="34" height="32" class="terminal" rx="10"></rect>
30+
<text class="terminal" x="279" y="195">IF</text>
31+
<rect x="325" y="177" width="48" height="32" rx="10"></rect>
32+
<rect x="323" y="175" width="48" height="32" class="terminal" rx="10"></rect>
33+
<text class="terminal" x="333" y="195">NOT</text>
34+
<rect x="393" y="177" width="68" height="32" rx="10"></rect>
35+
<rect x="391" y="175" width="68" height="32" class="terminal" rx="10"></rect>
36+
<text class="terminal" x="401" y="195">EXISTS</text>
37+
<a xlink:href="sql-grammar.html#name" xlink:title="name">
38+
<rect x="501" y="145" width="54" height="32"></rect>
39+
<rect x="499" y="143" width="54" height="32" class="nonterminal"></rect>
40+
<text class="nonterminal" x="509" y="163">name</text>
41+
</a>
42+
<a xlink:href="sql-grammar.html#typename" xlink:title="typename">
43+
<rect x="575" y="145" width="82" height="32"></rect>
44+
<rect x="573" y="143" width="82" height="32" class="nonterminal"></rect>
45+
<text class="nonterminal" x="583" y="163">typename</text>
2146
</a>
22-
<rect x="501" y="3" width="48" height="32" rx="10"></rect>
23-
<rect x="499" y="1" width="48" height="32" class="terminal" rx="10"></rect>
24-
<text class="terminal" x="509" y="21">ADD</text>
25-
<rect x="83" y="101" width="34" height="32" rx="10"></rect>
26-
<rect x="81" y="99" width="34" height="32" class="terminal" rx="10"></rect>
27-
<text class="terminal" x="91" y="119">IF</text>
28-
<rect x="137" y="101" width="48" height="32" rx="10"></rect>
29-
<rect x="135" y="99" width="48" height="32" class="terminal" rx="10"></rect>
30-
<text class="terminal" x="145" y="119">NOT</text>
31-
<rect x="205" y="101" width="68" height="32" rx="10"></rect>
32-
<rect x="203" y="99" width="68" height="32" class="terminal" rx="10"></rect>
33-
<text class="terminal" x="213" y="119">EXISTS</text>
34-
<rect x="83" y="145" width="78" height="32" rx="10"></rect>
35-
<rect x="81" y="143" width="78" height="32" class="terminal" rx="10"></rect>
36-
<text class="terminal" x="91" y="163">COLUMN</text>
37-
<rect x="201" y="177" width="34" height="32" rx="10"></rect>
38-
<rect x="199" y="175" width="34" height="32" class="terminal" rx="10"></rect>
39-
<text class="terminal" x="209" y="195">IF</text>
40-
<rect x="255" y="177" width="48" height="32" rx="10"></rect>
41-
<rect x="253" y="175" width="48" height="32" class="terminal" rx="10"></rect>
42-
<text class="terminal" x="263" y="195">NOT</text>
43-
<rect x="323" y="177" width="68" height="32" rx="10"></rect>
44-
<rect x="321" y="175" width="68" height="32" class="terminal" rx="10"></rect>
45-
<text class="terminal" x="331" y="195">EXISTS</text>
46-
<a xlink:href="sql-grammar.html#column_def" xlink:title="column_def">
47-
<rect x="451" y="101" width="92" height="32"></rect>
48-
<rect x="449" y="99" width="92" height="32" class="nonterminal"></rect>
49-
<text class="nonterminal" x="459" y="119">column_def</text>
47+
<a xlink:href="sql-grammar.html#col_qualification" xlink:title="col_qualification">
48+
<rect x="697" y="177" width="120" height="32"></rect>
49+
<rect x="695" y="175" width="120" height="32" class="nonterminal"></rect>
50+
<text class="nonterminal" x="705" y="195">col_qualification</text>
5051
</a>
51-
<path class="line" d="m17 17 h2 m0 0 h10 m62 0 h10 m0 0 h10 m62 0 h10 m20 0 h10 m0 0 h132 m-162 0 h20 m142 0 h20 m-182 0 q10 0 10 10 m162 0 q0 -10 10 -10 m-172 10 v12 m162 0 v-12 m-162 12 q0 10 10 10 m142 0 q10 0 10 -10 m-152 10 h10 m34 0 h10 m0 0 h10 m68 0 h10 m20 -32 h10 m104 0 h10 m0 0 h10 m48 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-530 98 l2 0 m2 0 l2 0 m2 0 l2 0 m22 0 h10 m34 0 h10 m0 0 h10 m48 0 h10 m0 0 h10 m68 0 h10 m0 0 h138 m-368 0 h20 m348 0 h20 m-388 0 q10 0 10 10 m368 0 q0 -10 10 -10 m-378 10 v24 m368 0 v-24 m-368 24 q0 10 10 10 m348 0 q10 0 10 -10 m-358 10 h10 m78 0 h10 m20 0 h10 m0 0 h200 m-230 0 h20 m210 0 h20 m-250 0 q10 0 10 10 m230 0 q0 -10 10 -10 m-240 10 v12 m230 0 v-12 m-230 12 q0 10 10 10 m210 0 q10 0 10 -10 m-220 10 h10 m34 0 h10 m0 0 h10 m48 0 h10 m0 0 h10 m68 0 h10 m40 -76 h10 m92 0 h10 m3 0 h-3"></path>
52-
<polygon points="561 115 569 111 569 119"></polygon>
53-
<polygon points="561 115 553 111 553 119"></polygon>
52+
<rect x="45" y="101" width="24" height="32" rx="10"></rect>
53+
<rect x="43" y="99" width="24" height="32" class="terminal" rx="10"></rect>
54+
<text class="terminal" x="53" y="119">,</text>
55+
<path class="line" d="m19 17 h2 m0 0 h10 m62 0 h10 m0 0 h10 m62 0 h10 m20 0 h10 m0 0 h132 m-162 0 h20 m142 0 h20 m-182 0 q10 0 10 10 m162 0 q0 -10 10 -10 m-172 10 v12 m162 0 v-12 m-162 12 q0 10 10 10 m142 0 q10 0 10 -10 m-152 10 h10 m34 0 h10 m0 0 h10 m68 0 h10 m20 -32 h10 m94 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-492 142 l2 0 m2 0 l2 0 m2 0 l2 0 m22 0 h10 m48 0 h10 m20 0 h10 m0 0 h88 m-118 0 h20 m98 0 h20 m-138 0 q10 0 10 10 m118 0 q0 -10 10 -10 m-128 10 v12 m118 0 v-12 m-118 12 q0 10 10 10 m98 0 q10 0 10 -10 m-108 10 h10 m78 0 h10 m40 -32 h10 m0 0 h200 m-230 0 h20 m210 0 h20 m-250 0 q10 0 10 10 m230 0 q0 -10 10 -10 m-240 10 v12 m230 0 v-12 m-230 12 q0 10 10 10 m210 0 q10 0 10 -10 m-220 10 h10 m34 0 h10 m0 0 h10 m48 0 h10 m0 0 h10 m68 0 h10 m20 -32 h10 m54 0 h10 m0 0 h10 m82 0 h10 m20 0 h10 m0 0 h130 m-160 0 h20 m140 0 h20 m-180 0 q10 0 10 10 m160 0 q0 -10 10 -10 m-170 10 v12 m160 0 v-12 m-160 12 q0 10 10 10 m140 0 q10 0 10 -10 m-150 10 h10 m120 0 h10 m-812 -32 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m812 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-812 0 h10 m24 0 h10 m0 0 h768 m23 44 h-3"></path>
56+
<polygon points="875 159 883 155 883 163"></polygon>
57+
<polygon points="875 159 867 155 867 163"></polygon>
5458
</svg>
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<svg width="762" height="134">
2+
3+
<polygon points="9 17 1 13 1 21"></polygon>
4+
<polygon points="17 17 9 13 9 21"></polygon>
5+
<rect x="31" y="3" width="62" height="32" rx="10"></rect>
6+
<rect x="29" y="1" width="62" height="32" class="terminal" rx="10"></rect>
7+
<text class="terminal" x="39" y="21">ALTER</text>
8+
<rect x="113" y="3" width="62" height="32" rx="10"></rect>
9+
<rect x="111" y="1" width="62" height="32" class="terminal" rx="10"></rect>
10+
<text class="terminal" x="121" y="21">TABLE</text>
11+
<rect x="215" y="35" width="34" height="32" rx="10"></rect>
12+
<rect x="213" y="33" width="34" height="32" class="terminal" rx="10"></rect>
13+
<text class="terminal" x="223" y="53">IF</text>
14+
<rect x="269" y="35" width="68" height="32" rx="10"></rect>
15+
<rect x="267" y="33" width="68" height="32" class="terminal" rx="10"></rect>
16+
<text class="terminal" x="277" y="53">EXISTS</text>
17+
18+
<rect x="377" y="3" width="94" height="32"></rect>
19+
<rect x="375" y="1" width="94" height="32" class="nonterminal"></rect>
20+
<text class="nonterminal" x="385" y="21">table_name</text>
21+
22+
<rect x="491" y="3" width="48" height="32" rx="10"></rect>
23+
<rect x="489" y="1" width="48" height="32" class="terminal" rx="10"></rect>
24+
<text class="terminal" x="499" y="21">ADD</text>
25+
<rect x="559" y="3" width="108" height="32" rx="10"></rect>
26+
<rect x="557" y="1" width="108" height="32" class="terminal" rx="10"></rect>
27+
<text class="terminal" x="567" y="21">CONSTRAINT</text>
28+
<a xlink:href="sql-grammar.html#name" xlink:title="name">
29+
<rect x="687" y="3" width="54" height="32"></rect>
30+
<rect x="685" y="1" width="54" height="32" class="nonterminal"></rect>
31+
<text class="nonterminal" x="695" y="21">name</text>
32+
</a>
33+
<a xlink:href="sql-grammar.html#constraint_elem" xlink:title="constraint_elem">
34+
<rect x="615" y="101" width="120" height="32"></rect>
35+
<rect x="613" y="99" width="120" height="32" class="nonterminal"></rect>
36+
<text class="nonterminal" x="623" y="119">constraint_elem</text>
37+
</a>
38+
<path class="line" d="m17 17 h2 m0 0 h10 m62 0 h10 m0 0 h10 m62 0 h10 m20 0 h10 m0 0 h132 m-162 0 h20 m142 0 h20 m-182 0 q10 0 10 10 m162 0 q0 -10 10 -10 m-172 10 v12 m162 0 v-12 m-162 12 q0 10 10 10 m142 0 q10 0 10 -10 m-152 10 h10 m34 0 h10 m0 0 h10 m68 0 h10 m20 -32 h10 m94 0 h10 m0 0 h10 m48 0 h10 m0 0 h10 m108 0 h10 m0 0 h10 m54 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-170 98 l2 0 m2 0 l2 0 m2 0 l2 0 m2 0 h10 m120 0 h10 m3 0 h-3"></path>
39+
<polygon points="753 115 761 111 761 119"></polygon>
40+
<polygon points="753 115 745 111 745 119"></polygon>
41+
</svg>
+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<svg width="712" height="222">
2+
3+
<polygon points="9 17 1 13 1 21"></polygon>
4+
<polygon points="17 17 9 13 9 21"></polygon>
5+
<rect x="31" y="3" width="62" height="32" rx="10"></rect>
6+
<rect x="29" y="1" width="62" height="32" class="terminal" rx="10"></rect>
7+
<text class="terminal" x="39" y="21">ALTER</text>
8+
<rect x="113" y="3" width="62" height="32" rx="10"></rect>
9+
<rect x="111" y="1" width="62" height="32" class="terminal" rx="10"></rect>
10+
<text class="terminal" x="121" y="21">TABLE</text>
11+
<rect x="215" y="35" width="34" height="32" rx="10"></rect>
12+
<rect x="213" y="33" width="34" height="32" class="terminal" rx="10"></rect>
13+
<text class="terminal" x="223" y="53">IF</text>
14+
<rect x="269" y="35" width="68" height="32" rx="10"></rect>
15+
<rect x="267" y="33" width="68" height="32" class="terminal" rx="10"></rect>
16+
<text class="terminal" x="277" y="53">EXISTS</text>
17+
18+
<rect x="377" y="3" width="94" height="32"></rect>
19+
<rect x="375" y="1" width="94" height="32" class="nonterminal"></rect>
20+
<text class="nonterminal" x="385" y="21">table_name</text>
21+
22+
<rect x="491" y="3" width="62" height="32" rx="10"></rect>
23+
<rect x="489" y="1" width="62" height="32" class="terminal" rx="10"></rect>
24+
<text class="terminal" x="499" y="21">ALTER</text>
25+
<rect x="593" y="35" width="78" height="32" rx="10"></rect>
26+
<rect x="591" y="33" width="78" height="32" class="terminal" rx="10"></rect>
27+
<text class="terminal" x="601" y="53">COLUMN</text>
28+
<a xlink:href="sql-grammar.html#name" xlink:title="name">
29+
<rect x="329" y="101" width="54" height="32"></rect>
30+
<rect x="327" y="99" width="54" height="32" class="nonterminal"></rect>
31+
<text class="nonterminal" x="337" y="119">name</text>
32+
</a>
33+
<rect x="423" y="101" width="44" height="32" rx="10"></rect>
34+
<rect x="421" y="99" width="44" height="32" class="terminal" rx="10"></rect>
35+
<text class="terminal" x="431" y="119">SET</text>
36+
<rect x="487" y="101" width="80" height="32" rx="10"></rect>
37+
<rect x="485" y="99" width="80" height="32" class="terminal" rx="10"></rect>
38+
<text class="terminal" x="495" y="119">DEFAULT</text>
39+
<a xlink:href="sql-grammar.html#a_expr" xlink:title="a_expr">
40+
<rect x="587" y="101" width="64" height="32"></rect>
41+
<rect x="585" y="99" width="64" height="32" class="nonterminal"></rect>
42+
<text class="nonterminal" x="595" y="119">a_expr</text>
43+
</a>
44+
<rect x="423" y="145" width="58" height="32" rx="10"></rect>
45+
<rect x="421" y="143" width="58" height="32" class="terminal" rx="10"></rect>
46+
<text class="terminal" x="431" y="163">DROP</text>
47+
<rect x="521" y="145" width="80" height="32" rx="10"></rect>
48+
<rect x="519" y="143" width="80" height="32" class="terminal" rx="10"></rect>
49+
<text class="terminal" x="529" y="163">DEFAULT</text>
50+
<rect x="521" y="189" width="48" height="32" rx="10"></rect>
51+
<rect x="519" y="187" width="48" height="32" class="terminal" rx="10"></rect>
52+
<text class="terminal" x="529" y="207">NOT</text>
53+
<rect x="589" y="189" width="56" height="32" rx="10"></rect>
54+
<rect x="587" y="187" width="56" height="32" class="terminal" rx="10"></rect>
55+
<text class="terminal" x="597" y="207">NULL</text>
56+
<path class="line" d="m17 17 h2 m0 0 h10 m62 0 h10 m0 0 h10 m62 0 h10 m20 0 h10 m0 0 h132 m-162 0 h20 m142 0 h20 m-182 0 q10 0 10 10 m162 0 q0 -10 10 -10 m-172 10 v12 m162 0 v-12 m-162 12 q0 10 10 10 m142 0 q10 0 10 -10 m-152 10 h10 m34 0 h10 m0 0 h10 m68 0 h10 m20 -32 h10 m94 0 h10 m0 0 h10 m62 0 h10 m20 0 h10 m0 0 h88 m-118 0 h20 m98 0 h20 m-138 0 q10 0 10 10 m118 0 q0 -10 10 -10 m-128 10 v12 m118 0 v-12 m-118 12 q0 10 10 10 m98 0 q10 0 10 -10 m-108 10 h10 m78 0 h10 m22 -32 l2 0 m2 0 l2 0 m2 0 l2 0 m-406 98 l2 0 m2 0 l2 0 m2 0 l2 0 m2 0 h10 m54 0 h10 m20 0 h10 m44 0 h10 m0 0 h10 m80 0 h10 m0 0 h10 m64 0 h10 m0 0 h14 m-282 0 h20 m262 0 h20 m-302 0 q10 0 10 10 m282 0 q0 -10 10 -10 m-292 10 v24 m282 0 v-24 m-282 24 q0 10 10 10 m262 0 q10 0 10 -10 m-272 10 h10 m58 0 h10 m20 0 h10 m80 0 h10 m0 0 h44 m-164 0 h20 m144 0 h20 m-184 0 q10 0 10 10 m164 0 q0 -10 10 -10 m-174 10 v24 m164 0 v-24 m-164 24 q0 10 10 10 m144 0 q10 0 10 -10 m-154 10 h10 m48 0 h10 m0 0 h10 m56 0 h10 m43 -88 h-3"></path>
57+
<polygon points="703 115 711 111 711 119"></polygon>
58+
<polygon points="703 115 695 111 695 119"></polygon>
59+
</svg>

0 commit comments

Comments
 (0)