Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
60
vendor/chi-teck/drupal-code-generator/templates/d8/hook/schema.twig
vendored
Normal file
60
vendor/chi-teck/drupal-code-generator/templates/d8/hook/schema.twig
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
/**
|
||||
* Implements hook_schema().
|
||||
*/
|
||||
function {{ machine_name }}_schema() {
|
||||
$schema['node'] = [
|
||||
// Example (partial) specification for table "node".
|
||||
'description' => 'The base table for nodes.',
|
||||
'fields' => [
|
||||
'nid' => [
|
||||
'description' => 'The primary identifier for a node.',
|
||||
'type' => 'serial',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
],
|
||||
'vid' => [
|
||||
'description' => 'The current {node_field_revision}.vid version identifier.',
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
],
|
||||
'type' => [
|
||||
'description' => 'The type of this node.',
|
||||
'type' => 'varchar',
|
||||
'length' => 32,
|
||||
'not null' => TRUE,
|
||||
'default' => '',
|
||||
],
|
||||
'title' => [
|
||||
'description' => 'The node title.',
|
||||
'type' => 'varchar',
|
||||
'length' => 255,
|
||||
'not null' => TRUE,
|
||||
'default' => '',
|
||||
],
|
||||
],
|
||||
'indexes' => [
|
||||
'node_changed' => ['changed'],
|
||||
'node_created' => ['created'],
|
||||
],
|
||||
'unique keys' => [
|
||||
'nid_vid' => ['nid', 'vid'],
|
||||
'vid' => ['vid'],
|
||||
],
|
||||
// For documentation purposes only; foreign keys are not created in the
|
||||
// database.
|
||||
'foreign keys' => [
|
||||
'node_revision' => [
|
||||
'table' => 'node_field_revision',
|
||||
'columns' => ['vid' => 'vid'],
|
||||
],
|
||||
'node_author' => [
|
||||
'table' => 'users',
|
||||
'columns' => ['uid' => 'uid'],
|
||||
],
|
||||
],
|
||||
'primary key' => ['nid'],
|
||||
];
|
||||
return $schema;
|
||||
}
|
Reference in a new issue