luyadev / luya

LUYA is a scalable web framework and content management system with the goal to please developers, clients and users alike.
https://luya.io
MIT License
811 stars 205 forks source link

There was 1 error after running phpunit #778

Closed squirrelm closed 8 years ago

squirrelm commented 8 years ago

phpunit output:

... There was 1 error:

1) tests\web\admin\models\StroageFileTest::testCrud yii\db\Exception: SQLSTATE[HY000]: General error: 1364 Field 'passthrough_file_password' doesn't have a default value The SQL being executed was: INSERT INTO admin_storage_file (name_original, name_new, mime_type, name_new_compound, extension, hash_file, hash_name, folder_id, upload_timestamp, file_size, upload_ user_id) VALUES ('0', '1', '2', '3', '4', '5', '6', 7, 1455866892, 9, 10) ...

nadar commented 8 years ago

Could please provide more informations? Have you run the tests as described:

in your LUYA fork? Version?

squirrelm commented 8 years ago

I have done all the 6 steps in Unit Tests from README.md. And I used git clone to get Luya, and imported database from tests/sql/1.0.0-beta5.sql. Maybe 1.0.0-beta5.sql is not suit for luya's current version 1.0.0-beta6?

nadar commented 8 years ago

@squirrelm i just checked a few things:

What version of MYSQL do you have? This could be a problem cause of mysql strict mode, but i am not sure yet.

could you just try to remove the NOT NULL "flag" attribute in your database (in phpmyadmin for example) where your run the LUYA tests, just to be sure.

squirrelm commented 8 years ago

@nadar my MySQL version is 5.7.10, for Win64 on x86_64. And i just done a test after removing NOT NULL attribute from column passthrough_file_password, all of the tests were passed.

nadar commented 8 years ago

I just added a beta6 sql file without the NOT NULL statement and also fixed the issue in the migration file. Thank you for the report.

squirrelm commented 8 years ago

you're welcome.