mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
Wrap long lines
This commit is contained in:
@@ -143,7 +143,12 @@ if (isset($_GET["clickhouse"])) {
|
||||
function __construct($connection) {
|
||||
parent::__construct($connection);
|
||||
$this->types = array( //! arrays
|
||||
lang('Numbers') => array("Int8" => 3, "Int16" => 5, "Int32" => 10, "Int64" => 19, "UInt8" => 3, "UInt16" => 5, "UInt32" => 10, "UInt64" => 20, "Float32" => 7, "Float64" => 16, 'Decimal' => 38, 'Decimal32' => 9, 'Decimal64' => 18, 'Decimal128' => 38),
|
||||
lang('Numbers') => array(
|
||||
"Int8" => 3, "Int16" => 5, "Int32" => 10, "Int64" => 19,
|
||||
"UInt8" => 3, "UInt16" => 5, "UInt32" => 10, "UInt64" => 20,
|
||||
"Float32" => 7, "Float64" => 16,
|
||||
'Decimal' => 38, 'Decimal32' => 9, 'Decimal64' => 18, 'Decimal128' => 38,
|
||||
),
|
||||
lang('Date and time') => array("Date" => 13, "DateTime" => 20),
|
||||
lang('Strings') => array("String" => 0),
|
||||
lang('Binary') => array("FixedString" => 0),
|
||||
|
@@ -74,7 +74,10 @@ SELECT @adminer_alter;
|
||||
} else {
|
||||
echo substr_replace($create, " IF NOT EXISTS", 12, 0) . ";\n\n";
|
||||
// create procedure which iterates over original columns and adds new and removes old
|
||||
$query = "SELECT COLUMN_NAME, COLUMN_DEFAULT, IS_NULLABLE, COLLATION_NAME, COLUMN_TYPE, EXTRA, COLUMN_COMMENT FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = " . Adminer\q($table) . " ORDER BY ORDINAL_POSITION";
|
||||
$query = "SELECT COLUMN_NAME, COLUMN_DEFAULT, IS_NULLABLE, COLLATION_NAME, COLUMN_TYPE, EXTRA, COLUMN_COMMENT
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = " . Adminer\q($table) . "
|
||||
ORDER BY ORDINAL_POSITION";
|
||||
echo "DELIMITER ;;
|
||||
CREATE PROCEDURE adminer_alter (INOUT alter_command text) BEGIN
|
||||
DECLARE _column_name, _collation_name, after varchar(64) DEFAULT '';
|
||||
|
@@ -14,12 +14,18 @@ class AdminerForeignSystem {
|
||||
"columns_priv" => array(array("table" => "user", "source" => array("Host", "User"), "target" => array("Host", "User"))),
|
||||
"db" => array(array("table" => "user", "source" => array("Host", "User"), "target" => array("Host", "User"))),
|
||||
"help_category" => array(array("table" => "help_category", "source" => array("parent_category_id"), "target" => array("help_category_id"))),
|
||||
"help_relation" => array(array("table" => "help_topic", "source" => array("help_topic_id"), "target" => array("help_topic_id")), array("table" => "help_keyword", "source" => array("help_keyword_id"), "target" => array("help_keyword_id"))),
|
||||
"help_relation" => array(
|
||||
array("table" => "help_topic", "source" => array("help_topic_id"), "target" => array("help_topic_id")),
|
||||
array("table" => "help_keyword", "source" => array("help_keyword_id"), "target" => array("help_keyword_id")),
|
||||
),
|
||||
"help_topic" => array(array("table" => "help_category", "source" => array("help_category_id"), "target" => array("help_category_id"))),
|
||||
"procs_priv" => array(array("table" => "user", "source" => array("Host", "User"), "target" => array("Host", "User")), array("table" => "proc", "source" => array("Db", "Routine_name"), "target" => array("db", "name"))),
|
||||
"tables_priv" => array(array("table" => "user", "source" => array("Host", "User"), "target" => array("Host", "User"))),
|
||||
"time_zone_name" => array(array("table" => "time_zone", "source" => array("Time_zone_id"), "target" => array("Time_zone_id"))),
|
||||
"time_zone_transition" => array(array("table" => "time_zone", "source" => array("Time_zone_id"), "target" => array("Time_zone_id")), array("table" => "time_zone_transition_type", "source" => array("Time_zone_id", "Transition_type_id"), "target" => array("Time_zone_id", "Transition_type_id"))),
|
||||
"time_zone_transition" => array(
|
||||
array("table" => "time_zone", "source" => array("Time_zone_id"), "target" => array("Time_zone_id")),
|
||||
array("table" => "time_zone_transition_type", "source" => array("Time_zone_id", "Transition_type_id"), "target" => array("Time_zone_id", "Transition_type_id")),
|
||||
),
|
||||
"time_zone_transition_type" => array(array("table" => "time_zone", "source" => array("Time_zone_id"), "target" => array("Time_zone_id"))),
|
||||
);
|
||||
return $return[$table];
|
||||
|
@@ -15,7 +15,15 @@ class AdminerTableStructure {
|
||||
function tableStructurePrint($fields) {
|
||||
echo "<div class='scrollable'>\n";
|
||||
echo "<table class='nowrap odds'>\n";
|
||||
echo "<thead><tr><th>" . Adminer\lang('Column') . "<th>" . Adminer\lang('Type') . "<th>" . Adminer\lang('Collation') . "<th>" . Adminer\lang('Nullable') . "<th>" . Adminer\lang('Default') . (Adminer\support("comment") ? "<th>" . Adminer\lang('Comment') : "") . "</thead>\n";
|
||||
echo "<thead><tr>"
|
||||
. "<th>" . Adminer\lang('Column')
|
||||
. "<th>" . Adminer\lang('Type')
|
||||
. "<th>" . Adminer\lang('Collation')
|
||||
. "<th>" . Adminer\lang('Nullable')
|
||||
. "<th>" . Adminer\lang('Default')
|
||||
. (Adminer\support("comment") ? "<th>" . Adminer\lang('Comment') : "")
|
||||
. "</thead>\n"
|
||||
;
|
||||
foreach ($fields as $field) {
|
||||
echo "<tr><th>" . Adminer\h($field["field"]) . ($field["primary"] ? " (PRIMARY)" : "");
|
||||
echo "<td><span>" . Adminer\h($field["full_type"]) . "</span>";
|
||||
|
Reference in New Issue
Block a user