Comments (3)
Solved!
Created table was in MyISAM, changed default storage engine in phpmyadmin Variables to InnoDB and now everything works as expected!
from yii2-youtube-clone.
Hello,
I don't think it is a version problem.
Do you have created_by column in videos table which has foreign key on users?
It seems to me that this column does not exist or there is no foreign key on users table.
from yii2-youtube-clone.
Yes, I do. In migrations file I have this code:
$this->addForeignKey(
'{{%fk-videos-created_by}}',
'{{%video}}',
'created_by',
'{{%user}}',
'id',
'CASCADE'
);
Last time I even copied your migration code to my project. Nothing changed.
In console after migration:
> add foreign key {{%fk-videos-created_by}}: {{%video}} (created_by) references {{%user}} (id) ... done (time: 0.045s)
from yii2-youtube-clone.
Related Issues (7)
- getting this error at 2:42:12 in tutorial while clicking the open video link HOT 4
- SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
- php-gd in require HOT 2
- issue on 3:41:00 to deleting the video HOT 3
- Cannot use positional argument after named argument at 04:04:13 HOT 1
- Video not appearing
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-youtube-clone.