65 Commits

Author SHA1 Message Date
7013441d1f Table editor: When adding a new column and the focused one is used as template, make sure we don't overtake the AUTO_INCREMENT default, as there can be only one auto-inc column in a table. 2009-09-05 09:59:10 +00:00
2f11cbca88 Table editor: When creating a new index by using the columns context menu "Create index", use the concatenated column names as index name, instead of "Index 123". 2009-09-05 09:50:02 +00:00
eb955ac3b3 D'oh - missing file for previous commit 2009-09-05 09:48:06 +00:00
a7eedd3823 Table editor, "Add column" action: Pointer to added TColumn object was mixed up with an existing column. ALTER code also needs to follow the order of tree nodes. Fixes issue #1340 . 2009-09-05 09:30:49 +00:00
a2c327fd26 Find a more self-explanatory name for ResetVTNodes() 2009-09-03 22:26:40 +00:00
be2ec499f8 Refactor internal handling of columns in table editor. Replaces the multi TStringList workaround with a more readable, object oriented approach. One minor visible effect is lightning fast initializing on very huge tables with several 100 columns. Apart from that this change should not affect any visible stuff. 2009-09-03 22:18:29 +00:00
9ff75351fd Don't eat leading whitespace, needed for separation to base ALTER query. Fixes issue #1333 2009-08-31 19:54:00 +00:00
9e731a78e1 Allow columns to have no default value at all. Important for TEXTs and BLOBs which cannot have one. Fixes issue #1261. 2009-08-30 18:31:31 +00:00
b1aaeaaaf4 Disable foreign key editor for table engines which don't support that. Display a red hint label so the user knows what to do to enable foreign keys. 2009-08-23 21:59:57 +00:00
679bbb428c Fix column clause detection of SHOW CREATE TABLE result, so foreign key clauses are not displayed as columns. 2009-08-23 18:49:27 +00:00
c058039c40 Allow reference table in foreign key tab to be from a different database. See comment #17 in issue #400 : http://code.google.com/p/heidisql/issues/detail?id=400#c17 2009-08-22 16:07:03 +00:00
8e57faf265 Start editing in columns list only on exact label click. Should avoid annoyance described in issue #1305 2009-08-19 05:57:29 +00:00
6517a04eff Implement creation and editing of foreign key constraints in a separate new tab on the table editor. Fixes issue #400. 2009-08-16 20:32:37 +00:00
ab60b78dba Only autostart grid editor if mouse hit was *exactly* on the cell text. Avoids annoyance in index editor. 2009-08-16 09:50:57 +00:00
4ff1acf408 Refactor session manager:
* Replace the pulldown by a list to get a better overview
* Display last connected and created date in details
* Prompt user on form closing if modifications should be saved
* Remove moreorless useless image
* Remove options "timeout" and "sort database"
TODO: Display some help text on the right side when no session at all is existant to help new users.
2009-08-09 23:57:52 +00:00
2e7022a945 Bold font for primary key columns in table editor. Icons for all key columns, similar to earlier versions of ListColumns on mainform. Feels very useful for a quick look when the index editor is mostly not active. 2009-07-29 20:50:41 +00:00
0e15201c71 Again, found a table with ON UPDATE CURRENT_TIMESTAMP clause which was not correctly detected. Fix case sensitiveness. 2009-07-27 22:38:07 +00:00
be834ab34a Fix detection logic in table editor for columns which allow NULL. Fixes issue #1270. 2009-07-27 22:15:57 +00:00
c15654aacb Do not eat last char of data type, using .+ in regular expression. Fixes issue #1260. 2009-07-27 20:10:05 +00:00
4d9d5a1ff7 Enable multi row selection in table editor's column list. Relevant functions adjusted:
* Add to index
* Create index
* Remove Column(s) (=> makes the "Clear columns" button superfluous)
2009-07-26 19:45:02 +00:00
d3b1cf80c9 End possible opened grid editor when tab focus changes, which unfortunately doesn't fire the OnExit event into the editor. Fixes issue #1273 2009-07-25 21:28:39 +00:00
e0761cedd9 Extend context menu of columns list in table editor with auto index creation/addition. Fixes issue #1269. 2009-07-25 19:35:09 +00:00
c7da465f11 Do not use blended datatype colors for displaying a NULL default value in the table editor, instead use clGray. Seems to steel attention when everything's too much colored. 2009-07-23 21:08:04 +00:00
97839a0409 Prefer our own inplace editor for editing column names, length and other properties in the table editor. Fixes issue #1253 2009-07-22 20:23:31 +00:00
a6e0bb6dc8 Fix issue #1270, Table editor detects DEFAULT 'xyz' as DEFAULT NULL if table has collation 2009-07-22 20:18:41 +00:00
0c3bc34802 Fix issue #1265 2009-07-22 05:50:07 +00:00
886f67cb62 Refactor grid editors unit: Implement a base class with all stuff which was implemented redundant previously and let all other editors descend from this class. Saves ~300 lines of code and makes implementing new editors easier.
Additionally this implements tabbing through edited fields for all grid editors. And it fixes issue #1266, issue #1267, issue #1253, issue #1178, issue #1155, issue #825 and issue #566 .
2009-07-20 23:07:28 +00:00
e2b252a906 Implement a new datatype selector for the table editor, including groups, datatype colors and help hints. Fixes issue #1214 and issue #1165 . 2009-07-07 23:31:16 +00:00
b12a115962 Add some intelligence to the table editor:
* Suggest length/set if required by newly selected data type
* Switch default value from NULL to empty string if "Allow NULL" was unchecked
2009-06-22 22:20:32 +00:00
3a5afde4d8 Table editor: Give default values a special color, leave text types black. 2009-06-22 21:57:04 +00:00
ce155c1a98 Fix issue #1236 Wrong DEFAULT value detection in table editor 2009-06-21 12:24:19 +00:00
0ab2599a17 Code cosmetic: Make CREATE and ALTER TABLE code more compact and readable by removing spaces between name/value pairs. 2009-06-18 19:45:14 +00:00
30f84c93a6 Use mainform's status panel and progressbar to display messages instead of a separate label on the table editor. 2009-06-18 19:33:51 +00:00
2f09c7760f A single quote in DEFAULT 'XYZ' and in COMMENT 'XYZ' gets escaped by single quote. Remove the escape char to fix duplicated single quotes in the end. 2009-06-18 19:12:56 +00:00
9db8a6c6ea Detect all column properties from a SHOW CREATE TABLE result, instead of SHOW FULL COLUMNS, so the missing ON UPDATE CURRENT_TIMESTAMP can be taken into account. The new parsing part in is probably slightly unstable yet, although tested on 4.0, 4.1 and 5.1 servers. Fixes issue #1133. 2009-06-18 19:02:07 +00:00
f6b4ac2a78 Add a workaround for a bug in SHOW FULL COLUMNS on 4.1 servers. Fixes issue #1224 2009-06-15 12:11:15 +00:00
d26d93aefa Sanitize MySQL structure unit:
* Remove old, unused code (TMysqlIndex, TMysqlField)
* Move relevant code from helpers to mysql_structures unit
* Rename various stuff to more compact names
* Use ordinal values instead of constants for datatypes and their categories
* Replace TGridColumn.IsXYZ boolean's by a new .DatatypeCat property
2009-06-14 19:45:48 +00:00
f86330032e Table editor: Fix empty index and collation clauses and friends, in ALTER and CREATE TABLE statements, mentioned in issue #1203 . So the user gets a more specific error message 2009-06-13 10:20:16 +00:00
8b37a0bbaa Fix issue #1213: table editor columns misaligned 2009-06-13 06:58:54 +00:00
403d88ceba Bring more implicit modification calls into the right place so the ALTER code is displayed correctly 2009-06-11 16:05:08 +00:00
184af6ce07 Bring order of implicit event calls into the right order to fix out of date ALTER TABLE code 2009-06-11 15:59:20 +00:00
ef14ba7cff Bugfix: Change events should not get fired as soon as the table editor has not finished loading. 2009-06-10 15:24:05 +00:00
41cf19de59 Fix issue #1191: Table editor should only touch changed columns. 2009-06-10 09:18:38 +00:00
c6743e087b Fix issue #1211: Table editor, length/set should be ignored or suppressed for datatypes which don't support that. Also, make relevant code for cell editing allowance and cell background painting more easy and less redundant. 2009-06-09 20:13:35 +00:00
f5de381e05 Fix issue #1209: list index out of bound when deleting a just created index 2009-06-09 12:54:11 +00:00
3bc31db014 Split "SQL code" tab into two "ALTER code" and "CREATE code", and display both in ALTER mode for copy+paste purposes. Fixes issue #1195. 2009-06-07 19:09:40 +00:00
358100d6b3 Fix issue #990: SQL error if switching from table to data view, if column to sort by has been deleted. Plus: fix relevant naming convention for property + field. 2009-06-06 19:42:20 +00:00
6576461b9e Try to fix issue #1188: weird values in collation pulldown inside the text editor. Could it be that TField.AsString is broken if this heals the problem. 2009-06-05 20:44:39 +00:00
26caf19b3b Add basic support for 3.23 servers in table editor. Fixes issue #1177. 2009-06-05 19:04:37 +00:00
11c70f62ee Fix issue #1176: Can't change table engine after creation. Seems a TCombobox.OnChange is not fired if a OnSelect coexists. 2009-06-05 17:25:35 +00:00