Giter Club home page Giter Club logo

Comments (3)

webeffected avatar webeffected commented on August 16, 2024 1

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.

thecodeholic avatar thecodeholic commented on August 16, 2024

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.

webeffected avatar webeffected commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.