migration

Extra changeColumns in Doctrine generate-migrations-diff

旧街凉风 提交于 2019-12-29 08:01:28
问题 I'm generating migrations between different yaml schema files: i.e. running: symfony doctrine:generate-migrations-diff And the resulting migration file has a whole slew of changeColumn calls that weren't added in the last schema file change. For example, if you run generate-migrations-diff without changing your schema file whatsoever, you should get an empty up() function. However, the function that results for me has a changeColumn call for virtually every table in my database. Am i doing

Triggering EF migration at application startup by code

こ雲淡風輕ζ 提交于 2019-12-28 18:07:08
问题 Using Entity Framework Migrations (Beta1), using Update-Database command is all good during development. But when the application is running on some customer's server somewhere, I really want my application to automatically update it's database schema to the latest version when it's started. Is this possible? Documentation is scarce. 回答1: They aren't providing a way to do this until RTM, at which point they have promised a command line app and a msdeploy provider. Source: http://blogs.msdn

Error creating new content types. Please make sure contenttypes is migrated before trying to migrate apps individually

我是研究僧i 提交于 2019-12-28 12:59:45
问题 I am trying to migrate from Django 1.6 to Django 1.8 . I was using South for managing migrations in Django 1.6. I have successfully created new migration files by python manage.py makemigrations . while running python manage.py migrate --fake-initial , I am getting this error Traceback (most recent call last): File "manage.py", line 39, in <module> execute_from_command_line(sys.argv) File "/home/jonty/.virtualenvs/squadrun/local/lib/python2.7/site- packages/django/core/management/__init__.py"

Error creating new content types. Please make sure contenttypes is migrated before trying to migrate apps individually

元气小坏坏 提交于 2019-12-28 12:58:12
问题 I am trying to migrate from Django 1.6 to Django 1.8 . I was using South for managing migrations in Django 1.6. I have successfully created new migration files by python manage.py makemigrations . while running python manage.py migrate --fake-initial , I am getting this error Traceback (most recent call last): File "manage.py", line 39, in <module> execute_from_command_line(sys.argv) File "/home/jonty/.virtualenvs/squadrun/local/lib/python2.7/site- packages/django/core/management/__init__.py"

How to normalize a SQL Database

霸气de小男生 提交于 2019-12-28 12:13:35
问题 I was wondering if anyone had any suggestions on how to normalize a database. Now, I don't mean designing the structure, I mean how to actually move the database data from an old structure to the new, normalized structure. I know I could write something like a PHP script, but I was wondering if there was a way to do it in SQL. Specifically MySQL. **EDIT: Has anyone tried something like SwisSQL? It's a migration tool, but i'm not sure if it will do what I'm asking. 回答1: Here is an Example of

PHP denying use of short hand “<?”

感情迁移 提交于 2019-12-28 06:50:14
问题 I just installed php 5.3.0 and it won't run php scripts utilizing short open tags like <?, only <?PHP. 回答1: You need to update your php.ini file. Set short_open_tag = 1 See the PHP Manual 回答2: That's because it's simply a bad practice. I suggest re-converting all your scripts to use <?php . If you're lazy, you can use a find and replace, if you have access to powerful command lines like bash you can use sed to do this for you. 回答3: http://us2.php.net/manual/en/ini.core.php you need to ini_set

What's the best way to migrate a Django DB from SQLite to MySQL?

拥有回忆 提交于 2019-12-27 16:40:28
问题 I need to migrate my db from sqlite to mysql, and the various tools/scripts out there are too many for me to easily spot the safest and most elegant solution. This seemed to me nice http://djangosnippets.org/snippets/14/ but appears to be 3 years since getting an update which is worrying.. Can you recommend a solution that is known to be reliable with Django 1.1.1 ? 回答1: Execute: python manage.py dumpdata > datadump.json Next, change your settings.py to the mysql database. Finally: python

What's the best way to migrate a Django DB from SQLite to MySQL?

青春壹個敷衍的年華 提交于 2019-12-27 16:40:28
问题 I need to migrate my db from sqlite to mysql, and the various tools/scripts out there are too many for me to easily spot the safest and most elegant solution. This seemed to me nice http://djangosnippets.org/snippets/14/ but appears to be 3 years since getting an update which is worrying.. Can you recommend a solution that is known to be reliable with Django 1.1.1 ? 回答1: Execute: python manage.py dumpdata > datadump.json Next, change your settings.py to the mysql database. Finally: python

How can I create migration from existing database?

我是研究僧i 提交于 2019-12-25 17:19:33
问题 How can I create migration from existing database? I wanted to do this with Xerton . I try do execute: php artisan make:migration But I'm getting this error: Not enough arguments (missing: "name"). Is it possible to migrate the existing database at once? Without having to migrate the tables separately? 回答1: When you create a migration you have to specify the name of the migration like this : php artisan make:migration create_users_table php artisan make:migration add_votes_to_users_table With

MigrationError during plone upgrading from 4.3.8 to 5.0.3

怎甘沉沦 提交于 2019-12-25 16:05:01
问题 OS: debian 8.3 I upgraded partially from 4.3.8 to 5.0.3. I get stuck in migration error to Dexterity. The process I did before upgrade in 4.3.8: Disable all add-ons Add a sitecustomize.py in site-package director: import sys sys.setdefaultencoding('utf8') update and re-index all catalog in keti/portal_catalog/manage_main delete 'checkout_workflow_policy' in keti/portal_properties/site_properties/manage_propertiesForm delete all objects in /keti/reference_catalog/manage_catalogView The process