Lines n/a 0 / 0
Functions and Methods n/a 0 / 0
Classes and Traits n/a 0 / 0
Name Lines Functions and Methods CRAP Classes and Traits
SchemaOperation n/a 0 / 0 n/a 0 / 0 0 n/a 0 / 0
1<?php
2
3declare(strict_types=1);
4
5namespace BlueprintAU\Radiant\Database\Schema\Enums;
6
7/**
8 * The schema-change vocabulary — the single currency of the schema layer: the differ
9 * emits it, {@see \BlueprintAU\Radiant\Database\Connections\SqlConnection::apply()}
10 * dispatches it, generated and hand-written migrations express it.
11 */
12enum SchemaOperation: string
13{
14    /** Add one or more columns. */
15    case AddColumn = 'add';
16
17    /** Drop one or more columns. */
18    case DropColumn = 'drop';
19
20    /** Create a whole table. */
21    case CreateTable = 'create';
22
23    /** Drop a whole table (destructive). */
24    case DropTable = 'drop_table';
25
26    /** Rebuild the table's indexes. */
27    case AlterIndexes = 'alter_indexes';
28
29    /** Rename a table. */
30    case RenameTable = 'rename_table';
31
32    /** Rename a column. */
33    case RenameColumn = 'rename_column';
34
35    /** Modify one or more columns in place. */
36    case ModifyColumn = 'modify';
37
38    /** Add a foreign-key constraint to an existing table. */
39    case AddForeignKey = 'add_foreign_key';
40
41    /** Drop a foreign-key constraint from an existing table. */
42    case DropForeignKey = 'drop_foreign_key';
43
44    /** Add a CHECK constraint to an existing table. */
45    case AddCheck = 'add_check';
46
47    /** Drop a CHECK constraint from an existing table. */
48    case DropCheck = 'drop_check';
49}