Skip to content

Commit 6351abd

Browse files
committed
Add documention and change log
1 parent b734a52 commit 6351abd

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

user_guide_src/source/changelogs/v4.3.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Database
7272
- SQLite :ref:`BaseConnection::getIndexData() <db-metadata-getindexdata>` now can return pseudo index named ``PRIMARY`` for `AUTOINCREMENT` column, and each returned index data has ``type`` property.
7373
- SQLSRV now automatically drops ``DEFAULT`` constraint when using :ref:`Forge::dropColumn() <db-forge-dropColumn>`.
7474
- ``BaseConnection::escape()`` now excludes the ``RawSql`` data type. This allows passing SQL strings into data.
75+
- The new method ``Forge::dropPrimaryKey()`` allows dropping the primary key on a table.
7576

7677
Model
7778
=====

user_guide_src/source/dbmgmt/forge.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,13 @@ Execute a DROP KEY.
229229

230230
.. literalinclude:: forge/020.php
231231

232+
Dropping a Primary Key
233+
======================
234+
235+
Execute a DROP PRIMARY KEY.
236+
237+
.. literalinclude:: forge/028.php
238+
232239
Renaming a Table
233240
================
234241

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
// MySqli Produces: ALTER TABLE `tablename` DROP PRIMARY KEY
4+
// Others Produces: ALTER TABLE `tablename` DROP CONSTRAINT `pk_tablename`
5+
$forge->dropPrimaryKey('tablename');

0 commit comments

Comments
 (0)