Allow to create primary key when there was none before (bug #996246).

This commit is contained in:
Michal Čihař
2004-07-28 14:17:44 +00:00
parent 6f2bd8c543
commit 4c01367304
2 changed files with 6 additions and 2 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-07-28 Michal Čihař <michal@cihar.com>
* tbl_properties_structure.php: Allow to create primary key when there was
none before (bug #996246).
2004-07-27 Marc Delisle <lem9@users.sourceforge.net>
* libraries/sqlparser.lib.php /sqlparser.data.php: bug 981343,
cannot copy a table with a timestamp (MySQL 4.1.2)

View File

@@ -311,8 +311,8 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
} else {
echo "\n";
?>
<a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP PRIMARY KEY, ADD PRIMARY KEY(' . $primary . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAPrimaryKey, htmlspecialchars($row['Field']))); ?>"
onclick="return confirmLink(this, 'ALTER TABLE <?php echo PMA_jsFormat($table); ?> DROP PRIMARY KEY, ADD PRIMARY KEY(<?php echo PMA_jsFormat($row['Field']); ?>)')">
<a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ( empty($primary) ? '' : ' DROP PRIMARY KEY,') . ' ADD PRIMARY KEY(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAPrimaryKey, htmlspecialchars($row['Field']))); ?>"
onclick="return confirmLink(this, 'ALTER TABLE <?php echo PMA_jsFormat($table) . ( empty($primary) ? '' : ' DROP PRIMARY KEY,'); ?> ADD PRIMARY KEY(<?php echo PMA_jsFormat($row['Field']); ?>)')">
<?php echo $titles['Primary']; ?></a>
<?php
}