mootensai / yii2-enhanced-gii

Enhanced Yii2 Gii (generator) that generates related Models & CRUD
MIT License
203 stars 98 forks source link

No Results Found - Crud / Can't find the doc? #127

Closed timbreitscheit54 closed 7 years ago

timbreitscheit54 commented 7 years ago

Hi mootensai, thanks for this great extension.

Please help me. Where is the documentation? I generate model and crud on existing table but in crud view receive 'no results found.' My best guess is, that this happens because of few missing columns in my database table but i have no idea which columns to add.

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";

CREATE TABLE urgencies ( id int(11) NOT NULL, priority varchar(12) NOT NULL, title varchar(32) NOT NULL, description mediumtext NOT NULL, respond_within int(11) NOT NULL, resolve_within int(11) NOT NULL, deleted_by int(11) DEFAULT NULL, created_at datetime DEFAULT NULL, updated_at datetime DEFAULT NULL, deleted_at datetime DEFAULT NULL, created_by int(11) DEFAULT NULL, updated_by int(11) DEFAULT NULL, uuid varchar(32) DEFAULT NULL, root int(11) DEFAULT NULL, lft int(11) NOT NULL, rgt int(11) NOT NULL, lvl smallint(5) NOT NULL, name varchar(60) NOT NULL, icon varchar(255) DEFAULT NULL, icon_type tinyint(1) NOT NULL DEFAULT '1', active tinyint(1) NOT NULL DEFAULT '1', selected tinyint(1) NOT NULL DEFAULT '0', disabled tinyint(1) NOT NULL DEFAULT '0', readonly tinyint(1) NOT NULL DEFAULT '0', visible tinyint(1) NOT NULL DEFAULT '1', collapsed tinyint(1) NOT NULL DEFAULT '0', movable_u tinyint(1) NOT NULL DEFAULT '1', movable_d tinyint(1) NOT NULL DEFAULT '1', movable_l tinyint(1) NOT NULL DEFAULT '1', movable_r tinyint(1) NOT NULL DEFAULT '1', removable tinyint(1) NOT NULL DEFAULT '1', removable_all tinyint(1) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE urgencies ADD PRIMARY KEY (id);

ALTER TABLE urgencies MODIFY id int(11) NOT NULL AUTO_INCREMENT; COMMIT;

mootensai commented 7 years ago

maybe that's because you activate timestamp, blameable, etc feature but u haven't create the column, empty up all the feature u don't use and re-generate

timbreitscheit54 commented 7 years ago

hi thank you, I tried that and the records now show. But please help me, I would rather like to create the missing columns but don't know which are missing, I receive no error just "no results found". :-) thank you

mootensai commented 7 years ago

the documentation in on the hints every field label..

timbreitscheit54 commented 7 years ago

i figured it out. in deed there was still a few columns missing in some of my tables. This is really great. Awesome. Much love.