草庐IT

schema_migration

全部标签

php - 运行 "No such file or directory"时的故障排除 `php app/console doctrine:schema:create`

我是Symfony2(beta4)和Doctrine的新手,当我尝试通过命令行创建数据库架构时遇到问题。这是错误:$phpapp/consoledoctrine:schema:createCreatingdatabaseschema...[PDOException]SQLSTATE[HY000][2002]Nosuchfileordirectory[ErrorException]Warning:PDO::__construct():[2002]Nosuchfileordirectory(tryingtoconnectviaunix:///var/mysql/mysql.sock)in/

php - 运行 "No such file or directory"时的故障排除 `php app/console doctrine:schema:create`

我是Symfony2(beta4)和Doctrine的新手,当我尝试通过命令行创建数据库架构时遇到问题。这是错误:$phpapp/consoledoctrine:schema:createCreatingdatabaseschema...[PDOException]SQLSTATE[HY000][2002]Nosuchfileordirectory[ErrorException]Warning:PDO::__construct():[2002]Nosuchfileordirectory(tryingtoconnectviaunix:///var/mysql/mysql.sock)in/

java - 读取 Avro 文件给出 AvroTypeException : missing required field error (even though the new field is declared null in schema)

我正在尝试反序列化/读取Avro文件,avro数据文件没有新字段。即使新字段在模式中声明为null,它也应该是可选的。但它仍然给我错误作为强制性的。Exceptioninthread"main"org.apache.avro.AvroTypeException:Foundcom.kiran.avro.User,expectingcom.kiran.avro.User,missingrequiredfieldlocAVRO模式声明:{"name":"loc","type":["string","null"]}使用代码读取文件:DatumReaderuserDatumReader=newS

sql-server - Sqoop 导出到 SQL Server : schemas?

我想将HDFS中的数据导出到架构my_schema中的SQLServer表。我试过像导入命令一样的--schema:sqoopexport\--libjars/opt/mapr/sqoop/sqoop-1.4.6/lib/sqljdbc4.jar\--connect"jdbc:sqlserver://MY-SERVER-DNS;database=my_db;"\--schema"myschema"\--table"my_table"\--export-dir/path/to/my/hdfs/dirERRORtool.BaseSqoopTool:Unrecognizedargument:

php - Doctrine Migrations 命名空间错误

我正在尝试在silex框架之上设置Doctrine迁移。我是通过composer安装的。"doctrine/dbal":"2.3.*","doctrine/migrations":"dev-master",我的控制台文件:...$app['composer_loader']->add('Doctrine\DBAL\Migrations',__DIR__.'/../vendor/doctrine/migrations/lib/');$helperSet=new\Symfony\Component\Console\Helper\HelperSet(array("db"=>new\Doctr

php - Symfony2 - 学说 :schema:update fails with entity outside of a bundle ( decoupled )

我正在阅读这篇文章:http://danielribeiro.org/yes-you-can-have-low-coupling-in-a-symfony-standard-edition-application/作者提到项目可以有这样的结构:src/└──Vendor/└──Product/└──Bundle└──BlogBundle/└──ForumBundle/└──SiteBundle/└──Controller/└──IndexController.php└──Resources/└──views/└──index.html.twig└──ProductSiteBundle.

php - 如何测试 Doctrine Migrations?

我正在从事的项目在开发环境中没有生产数据库的副本。有时我们会遇到数据库迁移问题-它们会传递开发数据库但在生产/测试中会失败。这通常是因为开发环境数据是从使用最新实体的Fixtures加载的-正确填充所有表格。是否有任何简单的方法来确保DoctrineMigration(s)将在生产中通过?您是否有/知道任何方法来编写自动测试以确保数据能够正确迁移,而无需下载生产/测试数据库并手动运行迁移?我想避免将生产/测试数据库下载到开发机器,这样我就可以检查迁移,因为数据库包含私有(private)数据并且它可能非常大。 最佳答案 首先,您需要

php - yii2基础模板migrate命令使用方法

我正在尝试将migrate命令与yii2基本模板一起使用我已经尝试过“yiimigrate”和“phpyiimigrate”,但它们都不起作用。我也试过phpinit但它说“无法打开输入文件:init”。 最佳答案 Yii2basic不附带启动迁移文件作为用户迁移文件。您可以从高级模板导入这些文件并将其放入迁移文件夹中。之后配置你的db你可以运行yiimigrate。 关于php-yii2基础模板migrate命令使用方法,我们在StackOverflow上找到一个类似的问题:

php - 如何使用 Laravel Migrations 在 Mysql 列中添加注释

这就是我想要做的if(!Schema::hasColumn('account_settings','minimum_onsite_length')){Schema::table('account_settings',function(Blueprint$table){$table->unsignedInteger('minimum_onsite_length')->default(180)->nullable()->comment('Thisiscomments');});}但是评论没有显示在迁移中,我在这里遗漏了什么吗?我也看过这个问题,但它不起作用here

php - 在 Mac 上设置 Laravel php artisan migrate 错误 : No such file or directory

这个问题在这里已经有了答案:MySQLconnectionnotworking:2002Nosuchfileordirectory(22个回答)关闭6年前。将一个完美运行的laravel项目从git拉入运行MAMP的mac。项目在linux机器上完美运行。Composer安装phpartisanmigrate,得到如下错误:[PDOException]SQLSTATE[HY000][2002]Nosuchfileordirectory注意:php-v是5.5而mysql-v是5.5从终端这是我的config/database.php的一部分'mysql'=>array('driver'