database-migration

MigrateDatabaseToLatestVersion not executed

删除回忆录丶 提交于 2019-12-20 18:18:59
问题 I can't figure out why my latest migration is not getting executed automatically on application startup (or at least on first access of the database context). I used to run update-database manually in development, but I want to test whether it will upgrade automatically on my hosted test environment. In Application_Start(): Database.SetInitializer<FepazoContext>( new MigrateDatabaseToLatestVersion<FepazoContext, FepazoConfiguration>()) In FepazoConfiguration: internal sealed class

MigrateDatabaseToLatestVersion not executed

流过昼夜 提交于 2019-12-20 18:18:12
问题 I can't figure out why my latest migration is not getting executed automatically on application startup (or at least on first access of the database context). I used to run update-database manually in development, but I want to test whether it will upgrade automatically on my hosted test environment. In Application_Start(): Database.SetInitializer<FepazoContext>( new MigrateDatabaseToLatestVersion<FepazoContext, FepazoConfiguration>()) In FepazoConfiguration: internal sealed class

database migration in Yii

廉价感情. 提交于 2019-12-20 11:29:14
问题 In order to doing migration in Yii I used this lines <?php class m110714_122129_users extends CDbMigration { public function up() { $this-> createTable('{{users}}',array( 'id' => 'pk', 'username' => 'VARCHAR (80) NOT NULL', 'password' => 'VARCHAR (80) NOT NULL', 'email' => 'VARCHAR (128) NOT NULL', 'activekey' => 'VARCHAR (128) NOT NULL DEFAULT \'\'', 'createtime' => 'INTEGER (10) NOT NULL DEFAULT \'0\' ', 'lastvisit' => 'INTEGER (10) NOT NULL DEFAULT \'0\' ', 'superuser' => 'INTEGER (1) NOT

How to set table names and columns as case sensitive in oracle 11g?

孤者浪人 提交于 2019-12-20 07:24:05
问题 I have a .NET 4.0 application that uses Entity Framework 4 that connects to a MS SQL 2008 database. The naming convention used is for example table "Clients", fields : "Id", "Id_Order". Now I need to switch from SQL Server to Oracle Server, so I migrated the MS SQL database to oracle database, but the problem is that all the table names and column names are uppercased, so by generating the edmx for oracle(using ODAC), I will have to change in code from "Clients" to "CLIENTS", "Id" to "ID",

Laravel Migration Error :: PDOException, Could not find driver

…衆ロ難τιáo~ 提交于 2019-12-20 06:39:02
问题 I am trying to make a laravel and stucked when migration. when i enter php artisan migrate in terminal, showing PDOException error. attaching my screenshot of terminal and phpinfo. What i sthis issue, How can i solve this, I am using Xampp. Anybody please help me. Thanks 回答1: Try re-installing Xampp? You could use Laravel homestead for a virtual machine, it makes sure you have the proper PHP version and the required dependencies needed to install and avoids having to run Xampp or MAMP or WAMP

Retrieving Table Structure with Dynamic SQL

感情迁移 提交于 2019-12-20 05:47:25
问题 I am migrating a database and am trying to retrieve table structure information into a single line item for machine processing. For technical reasons, existing migration tools can not be used and it must be processed in this manner. I have run the following query with success on multiple tables: SELECT LISTAGG(column_name || ',' || data_type || ',' || data_length, ',') WITHIN GROUP (ORDER BY column_id) FROM all_tab_cols WHERE table_name = 'MyTableName' For many of the tables it works fine and

South migrate DateField to IntegerField

喜夏-厌秋 提交于 2019-12-20 02:54:27
问题 I want to change my Model class Source(models.Model): release_date = models.DateField() to class Source(models.Model): release_date = models.IntegerField() as expected, I get an error django.db.utils.DataError: (1264, "Out of range value for column 'release_date' at row 1") What I actually want is, to only save the year in the IntegerField as that is all I need. Is there a very intelligent way to take existing dates' year field and migrate it to the new IntegerField by altering the method def

Laravel running migrations on “app/database/migrations” folder recursively

五迷三道 提交于 2019-12-18 11:18:43
问题 So my migrations folder looks like this since I have dozens of tables it keeps things organized and clean: migrations/ create_user_table.php relations/ translations/ I'm trying to do a refresh all migrations and seed but it seems like I've run into a slight hiccup where I don't know the artisan command to run migrations recursively (i.e. run migrations in the relations and translations folders as well). I've tried adding --path="app/database/migrations/*" however it spat out an error. Does

Migration Access to SQL server 2012

ⅰ亾dé卋堺 提交于 2019-12-18 09:36:48
问题 For an project, I need to migrate an Access database to SQL server 2012 express, I found some ways to do this, like using Microsoft up-sizing, but this question is not very technical but just to find out alternative ways, the database in access contains confidential data, so im not allowed to see data and I want to find out is there is any procedure that can be useful for me to achieve migration with out seeing the database itself and how to verify the data is exact in both. I don't have

System.Data.SqlClient is not supported on this platform

坚强是说给别人听的谎言 提交于 2019-12-18 07:46:17
问题 I'm using ASP.NET Core 2 with Entity Framework Core 2.0.2. I created a context and Add-Migrations command in Package Manager Controller works fine. However when Update-Database command is used, I get an error: System.Data.SqlClient is not supported on this platform I can't figure out where the problem is. Can you help me? Thanks. My .csproj file: <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>netcoreapp2.0</TargetFramework> <DebugType>portable</DebugType>