Comments (8)
could you give me the SQL related to that table?
from yii2-enhanced-gii.
CREATE TABLE IF NOT EXISTS `sales_key_focus_plan` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` int(11) NOT NULL COMMENT 'Sales Name',
`date_from` date NOT NULL COMMENT 'From',
`date_to` date NOT NULL COMMENT 'To',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
CONSTRAINT `FK_sales_key_focus_plan_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `sales_key_focus_plan_detail` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`sales_key_focus_plan_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Focus Plan ID',
`customer` varchar(100) NOT NULL COMMENT 'Customer',
`objective` text NOT NULL COMMENT 'Objectives',
`appointment_datetime` datetime DEFAULT NULL COMMENT 'Appointment Date/Time',
`remarks` text COMMENT 'Remarks',
PRIMARY KEY (`id`),
KEY `sales_key_focus_plan_id` (`sales_key_focus_plan_id`),
CONSTRAINT `FK_sales_key_focus_plan_detail_sales_key_focus_plan` FOREIGN KEY (`sales_key_focus_plan_id`) REFERENCES `sales_key_focus_plan` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
from yii2-enhanced-gii.
does the table sales_key_focus_plan_detail
is related to another table?
On Wed, Feb 24, 2016 at 9:18 AM, Ronal Gorba Timothy <
[email protected]> wrote:
-- Host: 127.0.0.1
-- Server version: 5.6.17 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 9.1.0.4867
/!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/!40101 SET NAMES utf8mb4 /;
/!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 /;
/!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;-- Dumping structure for table sysnet_v2.sales_key_focus_plan
CREATE TABLE IF NOT EXISTSsales_key_focus_plan
(
id
int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
user_id
int(11) NOT NULL COMMENT 'Sales Name',
date_from
date NOT NULL COMMENT 'From',
date_to
date NOT NULL COMMENT 'To',
PRIMARY KEY (id
),
KEYuser_id
(user_id
),
CONSTRAINTFK_sales_key_focus_plan_user
FOREIGN KEY (user_id
) REFERENCESuser
(id
)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;-- Dumping data for table sysnet_v2.sales_key_focus_plan: ~0 rows (approximately)
/!40000 ALTER TABLEsales_key_focus_plan
DISABLE KEYS */;
/!40000 ALTER TABLEsales_key_focus_plan
ENABLE KEYS */;-- Dumping structure for table sysnet_v2.sales_key_focus_plan_detail
CREATE TABLE IF NOT EXISTSsales_key_focus_plan_detail
(
id
int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
sales_key_focus_plan_id
int(11) NOT NULL DEFAULT '0' COMMENT 'Focus Plan ID',
customer
varchar(100) NOT NULL COMMENT 'Customer',
objective
text NOT NULL COMMENT 'Objectives',
appointment_datetime
datetime DEFAULT NULL COMMENT 'Appointment Date/Time',
remarks
text COMMENT 'Remarks',
PRIMARY KEY (id
),
KEYsales_key_focus_plan_id
(sales_key_focus_plan_id
),
CONSTRAINTFK_sales_key_focus_plan_detail_sales_key_focus_plan
FOREIGN KEY (sales_key_focus_plan_id
) REFERENCESsales_key_focus_plan
(id
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;-- Dumping data for table sysnet_v2.sales_key_focus_plan_detail: ~0 rows (approximately)
/!40000 ALTER TABLEsales_key_focus_plan_detail
DISABLE KEYS */;
/!40000 ALTER TABLEsales_key_focus_plan_detail
ENABLE KEYS /;
/!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') /;
/!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) /;
/!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;—
Reply to this email directly or view it on GitHub
#43 (comment)
.
from yii2-enhanced-gii.
No, its not. That table just has 1 foreign key (sales_key_focus_plan_id) with its reference table : "sales_key_focus_plan.id"
from yii2-enhanced-gii.
OK, the problem is on mootensai/yii2-relation-trait
I've fix that bug, please try to update & use the dev version
i don't know if this works
composer update mootensai/yii2-relation-trait:@dev
if it don't work, then
composer remove mootensai/yii2-relation-trait
composer require mootensai/yii2-relation-trait:@dev
from yii2-enhanced-gii.
Do I have to regenerate the CRUD with enhanced-gii?
from yii2-enhanced-gii.
No, you don't have to
On Wed, Feb 24, 2016 at 9:45 AM, Ronal Gorba Timothy <
[email protected]> wrote:
Do I have to regenerate the CRUD with enhanced-gii?
—
Reply to this email directly or view it on GitHub
#43 (comment)
.
from yii2-enhanced-gii.
Splendid! Its working now. Thanks.
from yii2-enhanced-gii.
Related Issues (20)
- In model generator tinyint create rules as string
- No results found. HOT 1
- Error when the instance of a model is created - Softdelete and Blameable Behavior HOT 1
- Custom Model Template HOT 1
- PHP version HOT 1
- wrong table name generated when table name has "_" in it HOT 1
- When I updated the master record, the child record on all related tables is soft deleted. HOT 1
- Generate migration column tinyint give error result
- Can't detect if in the model function beforesave the object is soft deleted HOT 1
- "Call to a member function getColumnNames() on null" HOT 1
- Open redirect in crud/default/views/_form.php HOT 2
- Models and CRUD generation in batch command HOT 1
- Edit Generator Code HOT 3
- PDOException: SQLSTATE[22007]: Invalid datetime format: 1292 Truncated incorrect DOUBLE value: HOT 2
- Model generation getRelations() bug
- Auto increment primary keys fails HOT 3
- bit, tinyint to boolean
- deletedByValueRestored is always 0
- HasMany: Update > valdiation error Message > update again >The object being updated is outdated. HOT 1
- Switch to twig or another templating engine? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-enhanced-gii.