我正在使用Doctrine2迁移.我需要一些关于我的疑问的答案,我无法在文件中找到一个好的解决方案
我用:
doctrine migrations:diff // generate migrations files
doctrine migrations:migrate // migrates up to new version
Run Code Online (Sandbox Code Playgroud)
我该如何迁移?指定以前的版本不起作用(没有更新它说fe教义迁移:迁移版本20120211163332它说
Migrating up to Version20120211163332 from 20120309112058
[Doctrine\DBAL\Migrations\MigrationException]
Could not find any migrations to execute.
Run Code Online (Sandbox Code Playgroud)
但它不起来它应该下降!您还可以看到响应中的版本
如果我必须进行一些数据库更新,是否可以添加一些SQL查询(更改一些与其他数据相关的数据)?我没有尝试过,因为失败不起作用:((
有没有办法在浏览器中使用migrate命令?我没有控制台访问共享主机,所以我需要这个功能,而不是逐个复制查询:D在phpMyAdmin
经过几年的PHP编程,这个问题对我来说似乎还是很奇怪.
我想制作一个可写的文件,以便在生产/开发中没有权限问题....但它仍然给我带来麻烦.
有人可以解释我的错误吗?
// permissions -- the folder writable by www-data
//drwxrwxrwx 2 www-data www-data 4096 mag 24 12:19 Details
// then the file not writable by the owner
-r----x--t 1 www-data www-data 0 giu 8 12:48 /home/giuseppe/homeProj//Ariprova/trunk/PhpCsv/phpcsv/ConfigClasses/Helpers/Virtuemart2/Details/324-PartsToAdd.json
// then the code
if (!file_exists($fileRequest)) { // it's found
throw new Exception ('File non trovato. Nome File completo: '.$fileRequest. ' con cartella '. getcwd());
}
if (!is_writable($fileRequest)) {
$results = @chmod($fileRequest, '0777'); //this gives true
}
$fileReq = fopen($fileRequest, 'w');
fwrite($fileReq, …
Run Code Online (Sandbox Code Playgroud)