mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
db-tools: corrected default for nullable to true and displaying now sql-conform NOT NULL and not nullable
This commit is contained in:
parent
425b96d3f5
commit
f9206f08f7
@ -337,6 +337,8 @@
|
||||
{
|
||||
$col_defs['default'] = is_int($col_defs['default']) ? '0' : "''"; // spezial value for empty, but set, default
|
||||
}
|
||||
$col_defs['notnull'] = isset($col_defs['nullable']) && !$col_defs['nullable'];
|
||||
|
||||
$col_defs['n'] = $n;
|
||||
|
||||
$content["Row$n"] = $col_defs;
|
||||
@ -404,12 +406,18 @@
|
||||
case 'type': // selectbox ensures type is not empty
|
||||
case 'precision':
|
||||
case 'scale':
|
||||
case 'nullable':
|
||||
// case 'nullable':
|
||||
if ($val != '' || $prop == 'nullable')
|
||||
{
|
||||
$table['fd'][$name][$prop] = $prop=='default'&& $val=="''" ? '' : $val;
|
||||
}
|
||||
break;
|
||||
case 'notnull':
|
||||
if ($val)
|
||||
{
|
||||
$table['fd'][$name]['nullable'] = False;
|
||||
}
|
||||
break;
|
||||
case 'pk':
|
||||
case 'uc':
|
||||
case 'ix':
|
||||
@ -866,7 +874,7 @@
|
||||
'type' => ''.$props['type'],
|
||||
'precision' => 0+$props['precision'],
|
||||
'scale' => 0+$props['scale'],
|
||||
'nullable' => !!$props['nullable'],
|
||||
'nullable' => !isset($props['nullable']) || !!$props['nullable'],
|
||||
'default' => ''.$props['default']
|
||||
);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// eTemplates for Application 'etemplate', generated by etemplate.dump() 2003-08-20 02:26
|
||||
// eTemplates for Application 'etemplate', generated by etemplate.dump() 2003-09-25 03:23
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
@ -139,3 +139,5 @@ $templ_data[] = array('name' => 'etemplate.editor.cell','template' => '','lang'
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.nextmatch_widget.nm_row','template' => '','lang' => '','group' => '0','version' => '0.9.15.006','data' => 'a:2:{i:0;a:9:{s:1:\"A\";s:2:\"1%\";s:1:\"B\";s:2:\"1%\";s:1:\"C\";s:3:\"30%\";s:1:\"D\";s:3:\"30%\";s:1:\"F\";s:3:\"15%\";s:1:\"G\";s:2:\"5%\";s:1:\"H\";s:2:\"1%\";s:1:\"I\";s:2:\"1%\";s:2:\"c1\";s:3:\"nmh\";}i:1;a:9:{s:1:\"A\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:24:\"first.gif,first-grey.gif\";s:5:\"label\";s:5:\"First\";s:4:\"name\";s:5:\"first\";s:4:\"help\";s:21:\"go to the first entry\";}s:1:\"B\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:22:\"left.gif,left-grey.gif\";s:5:\"label\";s:4:\"Left\";s:4:\"name\";s:4:\"left\";s:4:\"help\";s:34:\"go to the previous page of entries\";}s:1:\"C\";a:6:{s:4:\"type\";s:10:\"select-cat\";s:4:\"size\";s:2:\"-1\";s:5:\"label\";s:8:\"Category\";s:4:\"name\";s:6:\"cat_id\";s:8:\"onchange\";s:1:\"1\";s:4:\"help\";s:17:\"select a Category\";}s:1:\"D\";a:6:{s:4:\"type\";s:6:\"select\";s:5:\"label\";s:13:\"@filter_label\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:6:\"filter\";s:8:\"onchange\";s:1:\"1\";s:4:\"help\";s:12:\"@filter_help\";}s:1:\"E\";a:6:{s:4:\"type\";s:6:\"select\";s:5:\"label\";s:14:\"@filter2_label\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:7:\"filter2\";s:8:\"onchange\";s:1:\"1\";s:4:\"help\";s:13:\"@filter2_help\";}s:1:\"F\";a:5:{s:4:\"type\";s:4:\"text\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:6:\"search\";s:8:\"onchange\";s:1:\"1\";s:4:\"help\";s:28:\"a pattern to be searched for\";}s:1:\"G\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Search\";s:4:\"name\";s:12:\"start_search\";s:4:\"help\";s:19:\"to start the search\";}s:1:\"H\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:24:\"right.gif,right-grey.gif\";s:5:\"label\";s:5:\"Right\";s:4:\"name\";s:5:\"right\";s:4:\"help\";s:30:\"go to the next page of entries\";}s:1:\"I\";a:5:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:22:\"last.gif,last-grey.gif\";s:5:\"label\";s:4:\"Last\";s:4:\"name\";s:4:\"last\";s:4:\"help\";s:20:\"go to the last entry\";}}}','size' => '100%,,,,0,5','style' => '','modified' => '1061331789',);
|
||||
|
||||
$templ_data[] = array('name' => 'etemplate.db-tools.cols','template' => '','lang' => '','group' => '0','version' => '0.9.15.002','data' => 'a:3:{i:0;a:2:{s:2:\"c1\";s:3:\"nmh\";s:2:\"c2\";s:3:\"nmr\";}i:1;a:12:{s:1:\"A\";a:4:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:1:\"#\";s:7:\"no_lang\";s:1:\"1\";s:5:\"align\";s:6:\"center\";}s:1:\"B\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:10:\"ColumnName\";}s:1:\"C\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:4:\"Type\";}s:1:\"D\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:9:\"Precision\";}s:1:\"E\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:5:\"Scale\";}s:1:\"F\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:8:\"NOT NULL\";}s:1:\"G\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:6:\"Unique\";}s:1:\"H\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:11:\"Primary Key\";}s:1:\"I\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Indexed\";}s:1:\"J\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:11:\"Foreign Key\";}s:1:\"K\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Default\";}s:1:\"L\";a:5:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:10:\"Add Column\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:10:\"add_column\";s:4:\"help\";s:42:\"Add a new column (after the existing ones)\";}}i:2;a:12:{s:1:\"A\";a:4:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:12:\"Row${row}[n]\";}s:1:\"B\";a:5:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:2:\"20\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:15:\"Row${row}[name]\";s:4:\"help\";s:127:\"need to be unique in the table and no reseved word from SQL, best prefix all with a common 2-digit short for the app, eg. \'et_\'\";}s:1:\"C\";a:4:{s:4:\"type\";s:6:\"select\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:15:\"Row${row}[type]\";s:4:\"help\";s:18:\"type of the column\";}s:1:\"D\";a:4:{s:4:\"type\";s:3:\"int\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:20:\"Row${row}[precision]\";s:4:\"help\";s:64:\"length for char+varchar, precisions int: 2, 4, 8 and float: 4, 8\";}s:1:\"E\";a:3:{s:4:\"type\";s:3:\"int\";s:4:\"name\";s:16:\"Row${row}[scale]\";s:4:\"help\";s:15:\"scale for float\";}s:1:\"F\";a:4:{s:4:\"type\";s:8:\"checkbox\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:18:\"Row${row}[notnull]\";s:4:\"help\";s:35:\"can not have special SQL-value NULL\";}s:1:\"G\";a:4:{s:4:\"type\";s:8:\"checkbox\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:13:\"Row${row}[uc]\";s:4:\"help\";s:59:\"DB ensures that every row has a unique value in that column\";}s:1:\"H\";a:4:{s:4:\"type\";s:8:\"checkbox\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:13:\"Row${row}[pk]\";s:4:\"help\";s:52:\"Primary key for the table, gets automaticaly indexed\";}s:1:\"I\";a:4:{s:4:\"type\";s:8:\"checkbox\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:13:\"Row${row}[ix]\";s:4:\"help\";s:81:\"an indexed column speeds up querys using that column (cost space on the disk !!!)\";}s:1:\"J\";a:5:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:2:\"20\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:13:\"Row${row}[fk]\";s:4:\"help\";s:46:\"name of other table where column is a key from\";}s:1:\"K\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:2:\"20\";s:4:\"name\";s:18:\"Row${row}[default]\";s:4:\"help\";s:54:\"enter \'\' for an empty default, nothing mean no default\";}s:1:\"L\";a:5:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:13:\"Delete Column\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:12:\"delete[$row]\";s:4:\"help\";s:19:\"Deletes this column\";}}}','size' => '','style' => '','modified' => '1064452548',);
|
||||
|
||||
|
@ -25,7 +25,7 @@ attach file etemplate de Datei anh
|
||||
blurtext etemplate de blurText
|
||||
border etemplate de Rand
|
||||
border-line-thickness for the table-tag etemplate de Randbreite (border) für die Tabelle
|
||||
can have special sql-value null etemplate de darf speziellen SQL Wert NULL annehmen
|
||||
can not have special sql-value null etemplate de darf nicht den speziellen SQL Wert NULL annehmen
|
||||
cancel etemplate de Abbruch
|
||||
category etemplate de Kategorie
|
||||
cellpadding for the table-tag etemplate de Innenabstand (cellpadding) der Tabelle
|
||||
@ -160,9 +160,9 @@ newer version '%1' exists !!! etemplate de Neuere Version '%1' existiert !!!
|
||||
nextmatch etemplate de Nextmatch
|
||||
no file etemplate de keine Datei
|
||||
no filename given or selected via browse... etemplate de kein Dateiname angegeben oder mit [Browse...] ausgewählt
|
||||
not null etemplate de NOT NULL
|
||||
nothing found - try again !!! etemplate de Nichts gefunden - nochmal versuchen !!!
|
||||
nothing matched search criteria !!! etemplate de Nicht gefunden bei diesem Suchkriterium !!!
|
||||
nullable etemplate de Nullable
|
||||
number of colums the field/cell should span or 'all' for the remaining columns, css-class name (for the td tag) etemplate de Anzahl der Spalten die ein Feld überspannt oder 'all' für die übrigen Spalten, CSS class Name (für das TD-tag)
|
||||
number of rows/cols in a v/hbox, cellpadding, cellspacing etemplate de Anzahl Zeilen/Spalten der V/HBox, Innenabstand (Cellpadding), Zellenabstand (Cellspacing)
|
||||
of etemplate de von
|
||||
|
@ -25,7 +25,7 @@ attach file etemplate en attach file
|
||||
blurtext etemplate en blurText
|
||||
border etemplate en Border
|
||||
border-line-thickness for the table-tag etemplate en Border-line-thickness for the table-tag
|
||||
can have special sql-value null etemplate en can have special SQL-value NULL
|
||||
can not have special sql-value null etemplate en can not have special SQL-value NULL
|
||||
cancel etemplate en Cancel
|
||||
category etemplate en Category
|
||||
cellpadding for the table-tag etemplate en Cellpadding for the table-tag
|
||||
@ -160,9 +160,9 @@ newer version '%1' exists !!! etemplate en newer version '%1' exists !!!
|
||||
nextmatch etemplate en Nextmatch
|
||||
no file etemplate en no file
|
||||
no filename given or selected via browse... etemplate en no filename given or selected via Browse...
|
||||
not null etemplate en NOT NULL
|
||||
nothing found - try again !!! etemplate en Nothing found - try again !!!
|
||||
nothing matched search criteria !!! etemplate en Nothing matched search criteria !!!
|
||||
nullable etemplate en Nullable
|
||||
number of colums the field/cell should span or 'all' for the remaining columns, css-class name (for the td tag) etemplate en number of colums the field/cell should span or 'all' for the remaining columns, CSS-class name (for the TD tag)
|
||||
number of rows/cols in a v/hbox, cellpadding, cellspacing etemplate en number of rows/cols in a V/HBox, Cellpadding, Cellspacing
|
||||
of etemplate en of
|
||||
|
Loading…
Reference in New Issue
Block a user