aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordmoagx <post@wickenrode.com>2013-03-17 03:33:15 +0000
committerdmoagx <post@wickenrode.com>2013-03-17 03:33:15 +0000
commitaeb18ba57dd1fe9332d937118123e283112d1fc3 (patch)
tree31bdae75d2d9ef6b9ce3c5e6073c3f972af0b42d
parente6a8bcbae9ddd57471151b14481570bcbbf58771 (diff)
downloadsequelpro-aeb18ba57dd1fe9332d937118123e283112d1fc3.tar.gz
sequelpro-aeb18ba57dd1fe9332d937118123e283112d1fc3.tar.bz2
sequelpro-aeb18ba57dd1fe9332d937118123e283112d1fc3.zip
* Add support for ALTER DATABASE statement (needs review)
-rw-r--r--Interfaces/English.lproj/DBView.xib527
-rw-r--r--Interfaces/English.lproj/MainMenu.xib83
-rw-r--r--Source/SPDatabaseDocument.h6
-rw-r--r--Source/SPDatabaseDocument.m135
4 files changed, 712 insertions, 39 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib
index fa42d4a8..12e07964 100644
--- a/Interfaces/English.lproj/DBView.xib
+++ b/Interfaces/English.lproj/DBView.xib
@@ -21,15 +21,16 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="5906"/>
- <integer value="500"/>
- <integer value="557"/>
- <integer value="713"/>
+ <integer value="8277"/>
<integer value="6991"/>
- <integer value="6558"/>
<integer value="6766"/>
- <integer value="8199"/>
+ <integer value="5906"/>
<integer value="8081"/>
+ <integer value="8199"/>
+ <integer value="557"/>
+ <integer value="500"/>
+ <integer value="6558"/>
+ <integer value="713"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -5068,7 +5069,7 @@
<reference key="NSNextResponder" ref="730602982"/>
<int key="NSvFlags">1034</int>
<string key="NSFrame">{{25, 427}, {649, 5}}</string>
- <string key="NSBounds">{{0.5, 0}, {648, 5}}</string>
+ <string key="NSBounds">{{2, 0}, {645, 5}}</string>
<reference key="NSSuperview" ref="730602982"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -5091,7 +5092,7 @@
<reference key="NSNextResponder" ref="730602982"/>
<int key="NSvFlags">1034</int>
<string key="NSFrame">{{24, 316}, {649, 5}}</string>
- <string key="NSBounds">{{0.5, 0}, {648, 5}}</string>
+ <string key="NSBounds">{{2, 0}, {645, 5}}</string>
<reference key="NSSuperview" ref="730602982"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -6586,6 +6587,175 @@
<string key="NSMinSize">{384, 155}</string>
<string key="NSMaxSize">{600, 155}</string>
</object>
+ <object class="NSWindowTemplate" id="503007765">
+ <int key="NSWindowStyleMask">1</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{157, 342}, {384, 119}}</string>
+ <int key="NSWTFlags">1954021376</int>
+ <string key="NSWindowTitle">Alter Database</string>
+ <string key="NSWindowClass">NSWindow</string>
+ <nil key="NSViewClass"/>
+ <string key="NSWindowContentMaxSize">{600, 119}</string>
+ <string key="NSWindowContentMinSize">{384, 119}</string>
+ <object class="NSView" key="NSWindowView" id="255837856">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTextField" id="979902750">
+ <reference key="NSNextResponder" ref="255837856"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{17, 83}, {122, 14}}</string>
+ <reference key="NSSuperview" ref="255837856"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="986171443">
+ <int key="NSCellFlags">68157504</int>
+ <int key="NSCellFlags2">71304192</int>
+ <string key="NSContents">Database Encoding:</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="979902750"/>
+ <reference key="NSBackgroundColor" ref="62854682"/>
+ <reference key="NSTextColor" ref="454249633"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="219995620">
+ <reference key="NSNextResponder" ref="255837856"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{17, 58}, {122, 14}}</string>
+ <reference key="NSSuperview" ref="255837856"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="139258079">
+ <int key="NSCellFlags">68157504</int>
+ <int key="NSCellFlags2">71304192</int>
+ <string key="NSContents">Database Collation:</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="219995620"/>
+ <reference key="NSBackgroundColor" ref="62854682"/>
+ <reference key="NSTextColor" ref="454249633"/>
+ </object>
+ </object>
+ <object class="NSButton" id="587535516">
+ <reference key="NSNextResponder" ref="255837856"/>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{268, 13}, {101, 28}}</string>
+ <reference key="NSSuperview" ref="255837856"/>
+ <int key="NSTag">1</int>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="469417361">
+ <int key="NSCellFlags">67108864</int>
+ <int key="NSCellFlags2">138018816</int>
+ <string key="NSContents">Apply</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="587535516"/>
+ <int key="NSTag">1</int>
+ <int key="NSButtonFlags">-2038284288</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="932958253"/>
+ <string key="NSAlternateContents"/>
+ <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="704221162">
+ <reference key="NSNextResponder" ref="255837856"/>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{174, 13}, {96, 28}}</string>
+ <reference key="NSSuperview" ref="255837856"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="168267474">
+ <int key="NSCellFlags">67108864</int>
+ <int key="NSCellFlags2">138018816</int>
+ <string key="NSContents">Cancel</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="704221162"/>
+ <int key="NSButtonFlags">-2038284288</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="932958253"/>
+ <string key="NSAlternateContents"/>
+ <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSPopUpButton" id="770130127">
+ <reference key="NSNextResponder" ref="255837856"/>
+ <int key="NSvFlags">266</int>
+ <string key="NSFrame">{{143, 78}, {224, 22}}</string>
+ <reference key="NSSuperview" ref="255837856"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSPopUpButtonCell" key="NSCell" id="45417006">
+ <int key="NSCellFlags">-2076049856</int>
+ <int key="NSCellFlags2">132096</int>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="770130127"/>
+ <int key="NSButtonFlags">-2038284288</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="26"/>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ <nil key="NSMenuItem"/>
+ <bool key="NSMenuItemRespectAlignment">YES</bool>
+ <object class="NSMenu" key="NSMenu" id="749637168">
+ <string key="NSTitle">OtherViews</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <int key="NSSelectedIndex">-1</int>
+ <int key="NSPreferredEdge">3</int>
+ <bool key="NSUsesItemFromMenu">YES</bool>
+ <bool key="NSAltersState">YES</bool>
+ <int key="NSArrowPosition">1</int>
+ </object>
+ </object>
+ <object class="NSPopUpButton" id="698776052">
+ <reference key="NSNextResponder" ref="255837856"/>
+ <int key="NSvFlags">266</int>
+ <string key="NSFrame">{{143, 53}, {224, 22}}</string>
+ <reference key="NSSuperview" ref="255837856"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSPopUpButtonCell" key="NSCell" id="689411981">
+ <int key="NSCellFlags">-2076049856</int>
+ <int key="NSCellFlags2">132096</int>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="698776052"/>
+ <int key="NSButtonFlags">-2038284288</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="26"/>
+ <string key="NSAlternateContents"/>
+ <object class="NSMutableString" key="NSKeyEquivalent">
+ <characters key="NS.bytes"/>
+ </object>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ <nil key="NSMenuItem"/>
+ <bool key="NSMenuItemRespectAlignment">YES</bool>
+ <object class="NSMenu" key="NSMenu" id="755799992">
+ <string key="NSTitle">OtherViews</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <int key="NSSelectedIndex">-1</int>
+ <int key="NSPreferredEdge">3</int>
+ <bool key="NSUsesItemFromMenu">YES</bool>
+ <bool key="NSAltersState">YES</bool>
+ <int key="NSArrowPosition">1</int>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{384, 119}</string>
+ <reference key="NSSuperview"/>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
+ <string key="NSMinSize">{384, 141}</string>
+ <string key="NSMaxSize">{600, 141}</string>
+ </object>
<object class="NSWindowTemplate" id="1003190366">
<int key="NSWindowStyleMask">1</int>
<int key="NSWindowBacking">2</int>
@@ -6872,7 +7042,7 @@
<string key="NSWindowContentMaxSize">{600, 142}</string>
<string key="NSWindowContentMinSize">{384, 142}</string>
<object class="NSView" key="NSWindowView" id="846512394">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -6881,7 +7051,6 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{5, 105}, {128, 14}}</string>
<reference key="NSSuperview" ref="846512394"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="967312779">
<int key="NSCellFlags">68157504</int>
@@ -6898,7 +7067,6 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{5, 80}, {128, 14}}</string>
<reference key="NSSuperview" ref="846512394"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="308586219">
<int key="NSCellFlags">68157504</int>
@@ -6915,7 +7083,6 @@
<int key="NSvFlags">258</int>
<string key="NSFrame">{{138, 104}, {226, 18}}</string>
<reference key="NSSuperview" ref="846512394"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="39963071">
<int key="NSCellFlags">-1804599231</int>
@@ -6933,7 +7100,6 @@
<int key="NSvFlags">257</int>
<string key="NSFrame">{{291, 13}, {78, 28}}</string>
<reference key="NSSuperview" ref="846512394"/>
- <reference key="NSWindow"/>
<int key="NSTag">1</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="805893132">
@@ -6957,7 +7123,6 @@
<int key="NSvFlags">258</int>
<string key="NSFrame">{{135, 75}, {232, 22}}</string>
<reference key="NSSuperview" ref="846512394"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="285868883">
<int key="NSCellFlags">-2076049856</int>
@@ -6993,7 +7158,6 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{5, 54}, {128, 14}}</string>
<reference key="NSSuperview" ref="846512394"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="193977111">
<int key="NSCellFlags">68157504</int>
@@ -7010,7 +7174,6 @@
<int key="NSvFlags">258</int>
<string key="NSFrame">{{135, 50}, {232, 22}}</string>
<reference key="NSSuperview" ref="846512394"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="285541065">
<int key="NSCellFlags">-2076049856</int>
@@ -7046,7 +7209,6 @@
<int key="NSvFlags">257</int>
<string key="NSFrame">{{209, 13}, {84, 28}}</string>
<reference key="NSSuperview" ref="846512394"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="783843620">
<int key="NSCellFlags">67108864</int>
@@ -7065,8 +7227,6 @@
</object>
</object>
<string key="NSFrameSize">{384, 142}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
</object>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMinSize">{384, 164}</string>
@@ -16496,6 +16656,86 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<int key="connectionID">8275</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="770130127"/>
+ <reference key="destination" ref="698776052"/>
+ </object>
+ <int key="connectionID">8299</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="698776052"/>
+ <reference key="destination" ref="704221162"/>
+ </object>
+ <int key="connectionID">8300</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="704221162"/>
+ <reference key="destination" ref="587535516"/>
+ </object>
+ <int key="connectionID">8301</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="587535516"/>
+ <reference key="destination" ref="770130127"/>
+ </object>
+ <int key="connectionID">8302</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">closePanelSheet:</string>
+ <reference key="source" ref="427689665"/>
+ <reference key="destination" ref="587535516"/>
+ </object>
+ <int key="connectionID">8303</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">closePanelSheet:</string>
+ <reference key="source" ref="427689665"/>
+ <reference key="destination" ref="704221162"/>
+ </object>
+ <int key="connectionID">8304</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">databaseAlterSheet</string>
+ <reference key="source" ref="427689665"/>
+ <reference key="destination" ref="503007765"/>
+ </object>
+ <int key="connectionID">8305</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">databaseAlterEncodingButton</string>
+ <reference key="source" ref="427689665"/>
+ <reference key="destination" ref="770130127"/>
+ </object>
+ <int key="connectionID">8306</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">databaseAlterCollationButton</string>
+ <reference key="source" ref="427689665"/>
+ <reference key="destination" ref="698776052"/>
+ </object>
+ <int key="connectionID">8307</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">alterDatabaseEncodingButtonChanged:</string>
+ <reference key="source" ref="427689665"/>
+ <reference key="destination" ref="770130127"/>
+ </object>
+ <int key="connectionID">8308</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -23224,6 +23464,132 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="object" ref="520713941"/>
<reference key="parent" ref="504130104"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8276</int>
+ <reference key="object" ref="503007765"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="255837856"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Alter Database Sheet</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8277</int>
+ <reference key="object" ref="255837856"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="979902750"/>
+ <reference ref="219995620"/>
+ <reference ref="770130127"/>
+ <reference ref="698776052"/>
+ <reference ref="587535516"/>
+ <reference ref="704221162"/>
+ </object>
+ <reference key="parent" ref="503007765"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8278</int>
+ <reference key="object" ref="979902750"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="986171443"/>
+ </object>
+ <reference key="parent" ref="255837856"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8279</int>
+ <reference key="object" ref="219995620"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="139258079"/>
+ </object>
+ <reference key="parent" ref="255837856"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8280</int>
+ <reference key="object" ref="587535516"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="469417361"/>
+ </object>
+ <reference key="parent" ref="255837856"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8281</int>
+ <reference key="object" ref="704221162"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="168267474"/>
+ </object>
+ <reference key="parent" ref="255837856"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8282</int>
+ <reference key="object" ref="770130127"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="45417006"/>
+ </object>
+ <reference key="parent" ref="255837856"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8283</int>
+ <reference key="object" ref="698776052"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="689411981"/>
+ </object>
+ <reference key="parent" ref="255837856"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8284</int>
+ <reference key="object" ref="689411981"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="755799992"/>
+ </object>
+ <reference key="parent" ref="698776052"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8285</int>
+ <reference key="object" ref="755799992"/>
+ <reference key="parent" ref="689411981"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8286</int>
+ <reference key="object" ref="45417006"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="749637168"/>
+ </object>
+ <reference key="parent" ref="770130127"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8287</int>
+ <reference key="object" ref="749637168"/>
+ <reference key="parent" ref="45417006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8288</int>
+ <reference key="object" ref="168267474"/>
+ <reference key="parent" ref="704221162"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8289</int>
+ <reference key="object" ref="469417361"/>
+ <reference key="parent" ref="587535516"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8290</int>
+ <reference key="object" ref="139258079"/>
+ <reference key="parent" ref="219995620"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8291</int>
+ <reference key="object" ref="986171443"/>
+ <reference key="parent" ref="979902750"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -24332,6 +24698,36 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>8270.IBPluginDependency</string>
<string>8271.IBEditorWindowLastContentRect</string>
<string>8271.IBPluginDependency</string>
+ <string>8276.IBEditorWindowLastContentRect</string>
+ <string>8276.IBPluginDependency</string>
+ <string>8276.IBWindowTemplateEditedContentRect</string>
+ <string>8276.NSWindowTemplate.visibleAtLaunch</string>
+ <string>8276.windowTemplate.hasMaxSize</string>
+ <string>8276.windowTemplate.hasMinSize</string>
+ <string>8276.windowTemplate.maxSize</string>
+ <string>8276.windowTemplate.minSize</string>
+ <string>8277.IBPluginDependency</string>
+ <string>8278.IBPluginDependency</string>
+ <string>8278.IBViewBoundsToFrameTransform</string>
+ <string>8279.IBPluginDependency</string>
+ <string>8279.IBViewBoundsToFrameTransform</string>
+ <string>8280.IBPluginDependency</string>
+ <string>8280.IBViewBoundsToFrameTransform</string>
+ <string>8281.IBPluginDependency</string>
+ <string>8281.IBViewBoundsToFrameTransform</string>
+ <string>8282.IBPluginDependency</string>
+ <string>8282.IBViewBoundsToFrameTransform</string>
+ <string>8283.IBPluginDependency</string>
+ <string>8283.IBViewBoundsToFrameTransform</string>
+ <string>8284.IBPluginDependency</string>
+ <string>8285.IBEditorWindowLastContentRect</string>
+ <string>8285.IBPluginDependency</string>
+ <string>8286.IBPluginDependency</string>
+ <string>8287.IBPluginDependency</string>
+ <string>8288.IBPluginDependency</string>
+ <string>8289.IBPluginDependency</string>
+ <string>8290.IBPluginDependency</string>
+ <string>8291.IBPluginDependency</string>
<string>858.IBPluginDependency</string>
<string>959.IBEditorWindowLastContentRect</string>
<string>959.IBPluginDependency</string>
@@ -24545,12 +24941,12 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABAoAAAwtoAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABAoAAAwqYAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDDwAAwuAAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDDwAAwqwAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -24856,9 +25252,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{329, 701}, {384, 133}}</string>
+ <string>{{521, 945}, {384, 133}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{329, 701}, {384, 133}}</string>
+ <string>{{521, 945}, {384, 133}}</string>
<boolean value="YES"/>
<boolean value="YES"/>
<string>{600, 133}</string>
@@ -24927,7 +25323,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDTAAAwhwAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDTQAAwhwAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -25913,17 +26309,59 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABAoAAAwq4AAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABAoAAAwmgAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDDwAAwnQAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{461, 758}, {224, 6}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{913, 959}, {384, 119}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{913, 959}, {384, 119}}</string>
+ <boolean value="NO"/>
+ <boolean value="YES"/>
+ <boolean value="YES"/>
+ <string>{600, 119}</string>
+ <string>{384, 119}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDCQAAwsoAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDCQAAwpgAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDkIAAwhwAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDJAAAwhwAAA</bytes>
+ </object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDFAAAwtYAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDiYAAwtAAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDiYAAwp4AAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{461, 758}, {224, 6}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{329, 544}, {405, 267}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{329, 544}, {405, 267}}</string>
@@ -25950,7 +26388,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">8275</int>
+ <int key="maxID">8308</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -27164,6 +27602,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<string>addConnectionToFavorites:</string>
<string>addDatabase:</string>
+ <string>alterDatabase:</string>
+ <string>alterDatabaseEncodingButtonChanged:</string>
<string>analyzeTable:</string>
<string>backForwardInHistory:</string>
<string>cancelTask:</string>
@@ -27257,6 +27697,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@@ -27265,6 +27707,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<string>addConnectionToFavorites:</string>
<string>addDatabase:</string>
+ <string>alterDatabase:</string>
+ <string>alterDatabaseEncodingButtonChanged:</string>
<string>analyzeTable:</string>
<string>backForwardInHistory:</string>
<string>cancelTask:</string>
@@ -27321,6 +27765,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">alterDatabase:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">alterDatabaseEncodingButtonChanged:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">analyzeTable:</string>
<string key="candidateClassName">id</string>
</object>
@@ -27514,6 +27966,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>createTableSyntaxWindow</string>
<string>customQueryInstance</string>
<string>customQueryTextView</string>
+ <string>databaseAlterCollationButton</string>
+ <string>databaseAlterEncodingButton</string>
+ <string>databaseAlterSheet</string>
<string>databaseCollationButton</string>
<string>databaseCopyNameField</string>
<string>databaseCopySheet</string>
@@ -27585,6 +28040,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>NSWindow</string>
<string>id</string>
<string>NSTextView</string>
+ <string>NSPopUpButton</string>
+ <string>NSPopUpButton</string>
+ <string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
@@ -27659,6 +28117,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>createTableSyntaxWindow</string>
<string>customQueryInstance</string>
<string>customQueryTextView</string>
+ <string>databaseAlterCollationButton</string>
+ <string>databaseAlterEncodingButton</string>
+ <string>databaseAlterSheet</string>
<string>databaseCollationButton</string>
<string>databaseCopyNameField</string>
<string>databaseCopySheet</string>
@@ -27767,6 +28228,18 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string key="candidateClassName">NSTextView</string>
</object>
<object class="IBToOneOutletInfo">
+ <string key="name">databaseAlterCollationButton</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">databaseAlterEncodingButton</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">databaseAlterSheet</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
<string key="name">databaseCollationButton</string>
<string key="candidateClassName">id</string>
</object>
diff --git a/Interfaces/English.lproj/MainMenu.xib b/Interfaces/English.lproj/MainMenu.xib
index aa052a2f..848c0b09 100644
--- a/Interfaces/English.lproj/MainMenu.xib
+++ b/Interfaces/English.lproj/MainMenu.xib
@@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="758"/>
+ <integer value="628"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1264,6 +1264,14 @@
<reference key="NSOnImage" ref="625762401"/>
<reference key="NSMixedImage" ref="315854375"/>
</object>
+ <object class="NSMenuItem" id="179424169">
+ <reference key="NSMenu" ref="172963563"/>
+ <string key="NSTitle">Alter Database…</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="625762401"/>
+ <reference key="NSMixedImage" ref="315854375"/>
+ </object>
<object class="NSMenuItem" id="93508151">
<reference key="NSMenu" ref="172963563"/>
<bool key="NSIsDisabled">YES</bool>
@@ -3218,6 +3226,14 @@
</object>
<int key="connectionID">1231</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">alterDatabase:</string>
+ <reference key="source" ref="63651044"/>
+ <reference key="destination" ref="179424169"/>
+ </object>
+ <int key="connectionID">1233</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -3586,6 +3602,7 @@
<reference ref="929597005"/>
<reference ref="988156931"/>
<reference ref="74844157"/>
+ <reference ref="179424169"/>
</object>
<reference key="parent" ref="693420496"/>
</object>
@@ -4698,6 +4715,11 @@
<reference key="object" ref="294022145"/>
<reference key="parent" ref="1056168652"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1232</int>
+ <reference key="object" ref="179424169"/>
+ <reference key="parent" ref="172963563"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -4789,6 +4811,7 @@
<string>1214.IBPluginDependency</string>
<string>1217.IBPluginDependency</string>
<string>1218.IBPluginDependency</string>
+ <string>1232.IBPluginDependency</string>
<string>129.IBPluginDependency</string>
<string>129.ImportedFromIB2</string>
<string>130.IBEditorWindowLastContentRect</string>
@@ -5244,6 +5267,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{562, 439}, {64, 6}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -5321,7 +5345,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{449, 1007}, {197, 53}}</string>
- <string>{{366, 686}, {583, 20}}</string>
+ <string>{{367, 1049}, {583, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{506, 836}, {511, 20}}</string>
@@ -5355,7 +5379,7 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{333, 322}, {229, 253}}</string>
+ <string>{{378, 433}, {229, 253}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{518, 583}, {218, 253}}</string>
@@ -5363,7 +5387,7 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{608, 353}, {287, 333}}</string>
+ <string>{{609, 696}, {287, 353}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{312, 683}, {231, 153}}</string>
@@ -5641,7 +5665,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">1231</int>
+ <int key="maxID">1233</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -5654,6 +5678,7 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>addDatabase:</string>
+ <string>alterDatabase:</string>
<string>analyzeTable:</string>
<string>checkTable:</string>
<string>checksumTable:</string>
@@ -5712,6 +5737,7 @@
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@@ -5719,6 +5745,7 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>addDatabase:</string>
+ <string>alterDatabase:</string>
<string>analyzeTable:</string>
<string>checkTable:</string>
<string>checksumTable:</string>
@@ -5754,6 +5781,10 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">alterDatabase:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">analyzeTable:</string>
<string key="candidateClassName">id</string>
</object>
@@ -8075,6 +8106,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>addConnectionToFavorites:</string>
<string>addDatabase:</string>
+ <string>alterDatabase:</string>
<string>analyzeTable:</string>
<string>backForwardInHistory:</string>
<string>cancelTask:</string>
@@ -8089,6 +8121,7 @@
<string>copyCreateTableSyntax:</string>
<string>copyCreateTableSyntaxFromSheet:</string>
<string>copyDatabase:</string>
+ <string>databaseEncodingButtonChanged:</string>
<string>export:</string>
<string>exportSelectedTablesAs:</string>
<string>flushPrivileges:</string>
@@ -8166,6 +8199,8 @@
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@@ -8174,6 +8209,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>addConnectionToFavorites:</string>
<string>addDatabase:</string>
+ <string>alterDatabase:</string>
<string>analyzeTable:</string>
<string>backForwardInHistory:</string>
<string>cancelTask:</string>
@@ -8188,6 +8224,7 @@
<string>copyCreateTableSyntax:</string>
<string>copyCreateTableSyntaxFromSheet:</string>
<string>copyDatabase:</string>
+ <string>databaseEncodingButtonChanged:</string>
<string>export:</string>
<string>exportSelectedTablesAs:</string>
<string>flushPrivileges:</string>
@@ -8229,6 +8266,10 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">alterDatabase:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">analyzeTable:</string>
<string key="candidateClassName">id</string>
</object>
@@ -8285,6 +8326,10 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">databaseEncodingButtonChanged:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">export:</string>
<string key="candidateClassName">id</string>
</object>
@@ -8418,6 +8463,7 @@
<string>createTableSyntaxWindow</string>
<string>customQueryInstance</string>
<string>customQueryTextView</string>
+ <string>databaseCollationButton</string>
<string>databaseCopyNameField</string>
<string>databaseCopySheet</string>
<string>databaseDataInstance</string>
@@ -8496,6 +8542,7 @@
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
<string>NSTableView</string>
<string>id</string>
<string>NSScrollView</string>
@@ -8561,6 +8608,7 @@
<string>createTableSyntaxWindow</string>
<string>customQueryInstance</string>
<string>customQueryTextView</string>
+ <string>databaseCollationButton</string>
<string>databaseCopyNameField</string>
<string>databaseCopySheet</string>
<string>databaseDataInstance</string>
@@ -8668,6 +8716,10 @@
<string key="candidateClassName">NSTextView</string>
</object>
<object class="IBToOneOutletInfo">
+ <string key="name">databaseCollationButton</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
<string key="name">databaseCopyNameField</string>
<string key="candidateClassName">id</string>
</object>
@@ -10609,11 +10661,13 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>additionalDragHandleView</string>
<string>collapseToggleButton</string>
+ <string>delegate</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSView</string>
<string>NSButton</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
@@ -10622,6 +10676,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>additionalDragHandleView</string>
<string>collapseToggleButton</string>
+ <string>delegate</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -10633,6 +10688,10 @@
<string key="name">collapseToggleButton</string>
<string key="candidateClassName">NSButton</string>
</object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">delegate</string>
+ <string key="candidateClassName">id</string>
+ </object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -12228,7 +12287,6 @@
<string>outlineView</string>
<string>privsSupportedByServer</string>
<string>removeSchemaPrivButton</string>
- <string>schemaController</string>
<string>schemasTableView</string>
<string>splitView</string>
<string>tabView</string>
@@ -12250,7 +12308,6 @@
<string>NSOutlineView</string>
<string>NSMutableDictionary</string>
<string>NSButton</string>
- <string>NSArrayController</string>
<string>NSTableView</string>
<string>SPSplitView</string>
<string>NSTabView</string>
@@ -12275,7 +12332,6 @@
<string>outlineView</string>
<string>privsSupportedByServer</string>
<string>removeSchemaPrivButton</string>
- <string>schemaController</string>
<string>schemasTableView</string>
<string>splitView</string>
<string>tabView</string>
@@ -12337,10 +12393,6 @@
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo">
- <string key="name">schemaController</string>
- <string key="candidateClassName">NSArrayController</string>
- </object>
- <object class="IBToOneOutletInfo">
<string key="name">schemasTableView</string>
<string key="candidateClassName">NSTableView</string>
</object>
@@ -12371,6 +12423,13 @@
<string key="className">SPUserManager</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPUserManagerDataSource.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPUserManager</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
<string key="minorKey">Source/SPUserManagerDelegate.h</string>
</object>
</object>
diff --git a/Source/SPDatabaseDocument.h b/Source/SPDatabaseDocument.h
index da3d3c56..5cee9759 100644
--- a/Source/SPDatabaseDocument.h
+++ b/Source/SPDatabaseDocument.h
@@ -111,6 +111,10 @@
IBOutlet id databaseSheet;
IBOutlet id databaseCopySheet;
IBOutlet id databaseRenameSheet;
+
+ IBOutlet id databaseAlterSheet;
+ IBOutlet NSPopUpButton *databaseAlterEncodingButton;
+ IBOutlet NSPopUpButton *databaseAlterCollationButton;
IBOutlet NSProgressIndicator* queryProgressBar;
#ifndef SP_CODA
@@ -327,6 +331,8 @@
#endif
- (void)selectDatabase:(NSString *)aDatabase item:(NSString *)anItem;
- (IBAction)addDatabase:(id)sender;
+- (IBAction)alterDatabase:(id)sender;
+- (IBAction)alterDatabaseEncodingButtonChanged:(id)sender;
- (IBAction)databaseEncodingButtonChanged:(id)sender;
- (IBAction)removeDatabase:(id)sender;
- (IBAction)refreshTables:(id)sender;
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index e4f75610..2a48b221 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -114,10 +114,12 @@ enum {
static NSString *SPCreateSyntx = @"SPCreateSyntax";
#endif
static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
+static NSString *SPAlterDatabaseAction = @"SPAlterDatabase";
@interface SPDatabaseDocument ()
- (void)_evaluateCollationsForSelectedCharset;
- (void)_addDatabase;
+- (void)_alterDatabase;
#ifndef SP_CODA /* method decls */
- (void)_copyDatabase;
#endif
@@ -804,6 +806,103 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
contextInfo:@"addDatabase"];
}
+
+/**
+ * Show UI for the ALTER DATABASE statement
+ * @warning Make sure this method is only called on mysql 4.1+ servers!
+ */
+- (IBAction)alterDatabase:(id)sender
+{
+ //once the database is created the charset and collation are written
+ //to the db.opt regardless if they were explicity given or not.
+ //So there is no longer a "Default" option.
+
+ // Populate the database encoding popup button with a default menu item
+ [databaseAlterEncodingButton removeAllItems];
+ NSString *currentCharset = [databaseDataInstance getDatabaseDefaultCharacterSet];
+
+ // Retrieve the server-supported encodings and add them to the menu
+ NSArray *encodings = [databaseDataInstance getDatabaseCharacterSetEncodings];
+
+ if(![encodings count]) {
+ NSBeep();
+ NSLog(@"%s: Trying to show ALTER UI but getting CHARACTER SET list failed!",__func__);
+ return;
+ }
+
+ for (NSDictionary *encoding in encodings)
+ {
+ NSString *charsetId = [encoding objectForKey:@"CHARACTER_SET_NAME"];
+ NSString *description = [encoding objectForKey:@"DESCRIPTION"];
+ NSString *menuItemTitle = (![description length]) ? charsetId : [NSString stringWithFormat:@"%@ (%@)", description, charsetId];
+
+ NSMenuItem *menuItem = [[[NSMenuItem alloc] initWithTitle:menuItemTitle action:NULL keyEquivalent:@""] autorelease];
+ [menuItem setRepresentedObject:charsetId];
+
+ // If the UTF8 entry has been encountered, promote it to the top of the list (this time we don't want duplicates)
+ if ([charsetId isEqualToString:@"utf8"]) {
+ [[databaseAlterEncodingButton menu] insertItem:menuItem atIndex:0];
+ [[databaseAlterEncodingButton menu] insertItem:[NSMenuItem separatorItem] atIndex:1];
+ }
+ else {
+ [[databaseAlterEncodingButton menu] addItem:menuItem];
+ }
+
+ // select the current charset
+ if([charsetId isEqualToString:currentCharset])
+ [databaseAlterEncodingButton selectItem:menuItem];
+
+ }
+
+ //refresh collations for charset
+ [self alterDatabaseEncodingButtonChanged:nil];
+
+ [NSApp beginSheet:databaseAlterSheet
+ modalForWindow:parentWindow
+ modalDelegate:self
+ didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
+ contextInfo:SPAlterDatabaseAction];
+}
+
+/**
+ * Updates the list of collations for the currently selected encoding in the ALTER DATABASE sheet
+ * @warning Make sure this method is only called on mysql 4.1+ servers!
+ */
+- (IBAction)alterDatabaseEncodingButtonChanged:(id)sender
+{
+ NSString *currentCharset = [databaseDataInstance getDatabaseDefaultCharacterSet];
+ NSString *currentCollation = [databaseDataInstance getDatabaseDefaultCollation];
+
+ //throw out all items
+ [databaseAlterCollationButton removeAllItems];
+
+ //get the selected charset id
+ NSString *charsetId = [[databaseAlterEncodingButton selectedItem] representedObject];
+ //this should not fail so far down the line
+ if(![charsetId length]) {
+ NSLog(@"%s: Encoding menu item <%@> does not represent any charset!",__func__,[databaseAlterEncodingButton title]);
+ return;
+ }
+
+ //now let's get the list of collations for the selected charset id
+ NSArray *applicableCollations = [databaseDataInstance getDatabaseCollationsForEncoding:charsetId];
+ //and add the real items
+ for (NSDictionary *collation in applicableCollations)
+ {
+ NSString *collationName = [collation objectForKey:@"COLLATION_NAME"];
+
+ NSMenuItem *menuItem = [[[NSMenuItem alloc] initWithTitle:collationName action:NULL keyEquivalent:@""] autorelease];
+ [[databaseAlterCollationButton menu] addItem:menuItem];
+
+ //if the charset is the current charset and this is the current collation
+ //else if this collation is the default for the selected charset
+ // => select it
+ if(([charsetId isEqualToString:currentCharset] && [collationName isEqualToString:currentCollation]) ||
+ (![charsetId isEqualToString:currentCharset] && [[collation objectForKey:@"IS_DEFAULT"] isEqualToString:@"Yes"]))
+ [databaseAlterCollationButton selectItem:menuItem];
+ }
+}
+
- (IBAction)databaseEncodingButtonChanged:(id)sender
{
[self _evaluateCollationsForSelectedCharset];
@@ -1021,6 +1120,11 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
}
#endif
}
+ else if([contextInfo isEqualToString:SPAlterDatabaseAction]) {
+ if(returnCode == NSOKButton) {
+ [self _alterDatabase];
+ }
+ }
#ifndef SP_CODA
// Close error status sheet for OPTIMIZE, CHECK, REPAIR etc.
else if ([contextInfo isEqualToString:@"statusError"]) {
@@ -3492,6 +3596,11 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
return (enable && (tag == SPSQLExport));
}
}
+
+ //can only be enabled on mysql 4.1+
+ if([menuItem action] == @selector(alterDatabase:)) {
+ return (([self database] != nil) && [serverSupport supportsPost41CharacterSetHandling]);
+ }
if ([menuItem action] == @selector(import:) ||
[menuItem action] == @selector(removeDatabase:) ||
@@ -6002,6 +6111,32 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
}
/**
+ * Run ALTER statement against current db. This is the callback to alterDatabase:
+ * @warning Make sure this method is only called on mysql 4.1+ servers!
+ */
+- (void)_alterDatabase
+{
+ //we'll always run the alter statement, even if old == new because after all that is what the user requested
+
+ NSString *newCharset = [[databaseAlterEncodingButton selectedItem] representedObject];
+ NSString *newCollation = [databaseAlterCollationButton titleOfSelectedItem];
+
+ NSString *alterStatement = [NSString stringWithFormat:@"ALTER DATABASE %@ DEFAULT CHARACTER SET %@ DEFAULT COLLATE %@", [[self database] backtickQuotedString],[newCharset backtickQuotedString],[newCollation backtickQuotedString]];
+
+ //run alter
+ [mySQLConnection queryString:alterStatement];
+
+ if ([mySQLConnection queryErrored]) {
+ // An error occurred
+ SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, parentWindow, self, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"Couldn't alter database.\nMySQL said: %@", @"Alter Database : Query Failed ($1 = mysql error message)"), [mySQLConnection lastErrorMessage]]);
+ return;
+ }
+
+ //invalidate old cache values
+ [databaseDataInstance resetAllData];
+}
+
+/**
* Removes the current database.
*/
- (void)_removeDatabase