Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

CreateTable

ratajs edited this page Feb 6, 2017 · 1 revision

CreateTable

This method creates table. Syntax:
$object->createTable(string $table, array $names, array $types, array $lenghts[, string $primary = NULL[, array $uniques = array()[, array $others = array()]]])
Object
- Object of extension.
Table
- Table name.
Names
- Array of column names.
Types
- Array of column types (int or bigint for number, varchar for text…).
Lengths
- Array of maxlenghts, in case of INT type, value can be empty.
Primary
- Name of column, which will have PRIMARY key.
Uniques
- Array of column names, which will have UNIQUE key.
Others
- Array of additional parameters of columns, E. G. A_I.
Clone this wiki locally