[Gelöst][D8] modul schema schreibt keine tabellen in mysql
am 13.08.2015 - 16:28 Uhr in
Hallo,
ich habe xampp auf windows 10 laufen. Composer und Drush sind installiert, Umgebungsvariablen in Windows 10 angepasst. Sowohl Composer als auch xampp laufen (Test über CMD "mysl" / "drush help"). Ich kann auf die mysql zugreifen und auch drush führt Befehle aus.
Drupal 8 erfolgreich installiert und auch mein erstes eigenes Modul wird erfolgreich installiert.
Ich habe in meinem modul Ordner eine "MeinModul.install" angelegt, aber die Tabellen werden nicht in mysql nach der Installation geschrieben. Was mache ich falsch bzw. wieso erhalte ich keine Fehlermeldung?
Was kann ich noch testen?
MeinModul.install (kann hier keinen Fehler sehen)...
<?php
/**
* @file
* Install and uninstall functions for the MeinModul module.
*
* This file contains the functions required to perform install and
* uninstall operations.
*/
/**
* Implements hook_schema().
*
* @ingroup MeinModul_knr
*/
function ki_core_schema() {
$schema['MeinModul_knr'] = array(
'description' => 'Untranslated description of this table',
'fields' => array(
'nid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => 'id = > Primary Key'),
'knr' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE,'default' => 0, ''),
'koa' => array('type' => 'varchar','length' => 100,'not null' => TRUE, 'default' => '', 'description' => ''),
'ust' => array('type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 0, 'description' => 'boolean'),
'rfa' => array('type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 1, 'description' => 'boolean'),
'nfa' => array('type' => 'numeric', 'size' => 'normal', 'not null' => TRUE, 'default' => 0, 'precision' => 10, 'scale' => 2, 'description' => ''),
'mon' => array('type' => 'numeric', 'size' => 'normal', 'not null' => TRUE, 'default' => 0, 'precision' => 10, 'scale' => 10, 'description' => ''),
'kza' => array('type' => 'numeric', 'size' => 'normal', 'not null' => TRUE, 'default' => 0, 'precision' => 10, 'scale' => 10, 'description' => ''),
'kza_unit' => array('type' => 'varchar','length' => 10,'not null' => TRUE, 'default' => 'N.N.', 'description' => 'unit'),
),
'primary key' => array('nid'),
'indexes' => array('idx_knr' => array('knr')),
);
return $schema;
};
Habe es auch schon mit einem Schema aus einem Beispiel eines bestehenden D8 Modul versucht. Geht nicht. Was bedeutet in diesem Zusammenhang "bootstrap" mysql?
Was haben folgende Tabellen in der durch xampp installierten mysql zu bedeuten? Werden diese gebraucht?
- cdcol
- information_schema
- mysql
- performance_schema
- phpmyadmin
- test
- webauth
Gruß...
- Anmelden oder Registrieren um Kommentare zu schreiben
Sorry, I got lost...the table
am 14.08.2015 - 11:08 Uhr
Sorry, I got lost...die Tabelle wird geschrieben, allerdings mit einem Tabellen-Prefix den ich für Drupal angelegt hatte. Da habe ich einfach nicht aufgepasst und natürlich die Tabelle nicht direkt gesehen ;)
closed