database-migration

How to migrate SQL Server database to MySQL? [closed]

只谈情不闲聊 提交于 2019-11-26 17:52:43
I have a SQL Server database with lots of data and an empty MySQL database. Now I want to copy all data of SQL Server database (including the database schema) to the MySQL database. I thought about using raw SQL dump, but SQL Server's SQL syntax is not same as MySQL. And I have googled some database migration tool, such as south (only for django), simple-db-migration (only for one type of database, maybe PostreSQL?) and SQLAlchemy (I haven't finished learning it, just feeling it somewhat clunky). What tool can I use to do this migration? I'm usually using opendbcopy for these kind of jobs ...

Laravel : Migrations & Seeding for production data

点点圈 提交于 2019-11-26 15:15:48
问题 My application needs a pre registered data set to work. So i need to insert them in the database when i set up the application. Laravel propose two mechanisms : Database migrations : "They allow a team to modify the database schema and stay up to date on the current schema state." Database seeding : "Laravel also includes a simple way to seed your database with test data using seed classes." When I read this description, none of these solutions seems to be adapted. A similar question has been

How do I enable EF migrations for multiple contexts to separate databases?

萝らか妹 提交于 2019-11-26 14:03:16
How do I enable Entity Framework 5 (version 5.0.0) migrations for multiple DB contexts in the same project, where each context corresponds to its own database? When I run Enable-Migrations in the PM console (Visual Studio 2012), there's an error because of there being multiple contexts: PM> Enable-Migrations More than one context type was found in the assembly 'DatabaseService'. To enable migrations for DatabaseService.Models.Product1DbContext, use Enable-Migrations -ContextTypeName DatabaseService.Models.Product1DbContext. To enable migrations for DatabaseService.Models.Product2DbContext, use

How to export SQL Server database to MySQL? [duplicate]

我的梦境 提交于 2019-11-26 12:06:06
This question already has an answer here: Convert T-SQL to MySQL 5 answers I'm trying to convert from a SQL Server database backup file ( .bak ) to MySQL. This question and answers have been very useful, and I have successfully imported the database, but am now stuck on exporting to MySQL. The MySQL Migration Toolkit was suggested, but seems to have been replaced by the MySQL Workbench . Is it possible to use the MySQL Workbench to migrate from SQL Server in the same way that the migration tool worked? Or is the Migration Toolkit still available somewhere? Javier Cadiz You can use MySQL

Use one Laravel migrations table per database

孤街醉人 提交于 2019-11-26 09:31:12
问题 I work in a project that uses multiple databases. It seems like Laravel only uses the migrations-table in the database that is set as default. I would like one migrations table per database that logs the migrations that have been done to that specific database. Is this possible? I have defined the databases in the config like this: \'connections\' => [ \'db1\' => array( \'driver\' => \'mysql\', \'host\' => \'db1.host\', \'database\' => \'db1\', \'username\' => \'username\', \'password\' => \

Access denied for user 'homestead'@'localhost' (using password: YES)

▼魔方 西西 提交于 2019-11-26 08:57:58
问题 I\'m on a Mac OS Yosemite using Laravel 5.0. While in my local environment, I run php artisan migrate I keep getting : Access denied for user \'homestead\'@\'localhost\' (using password: YES) Configuration Here is my .env APP_ENV=local APP_DEBUG=true APP_KEY=***** DB_HOST=localhost DB_DATABASE=homestead DB_USERNAME=homestead DB_PASSWORD=secret app\\config\\database.php \'mysql\' => [ \'driver\' => \'mysql\', \'host\' => env(\'DB_HOST\', \'localhost\'), \'database\' => env(\'DB_DATABASE\', \

How do I copy SQL Azure database to my local development server?

六眼飞鱼酱① 提交于 2019-11-26 07:53:25
问题 Does anyone know how I can copy a SQL Azure database to my development machine? I\'d like to stop paying to have a development database in the cloud, but it\'s the best way to get production data. I copy my production database to a new development database but I\'d like to have that same database local. Any suggestions? 回答1: There are multiple ways to do this: Using SSIS (SQL Server Integration Services) . It only imports data in your table. Column properties, constraints, keys, indices,

How to migrate SQL Server database to MySQL? [closed]

萝らか妹 提交于 2019-11-26 05:37:35
问题 I have a SQL Server database with lots of data and an empty MySQL database. Now I want to copy all data of SQL Server database (including the database schema) to the MySQL database. I thought about using raw SQL dump, but SQL Server\'s SQL syntax is not same as MySQL. And I have googled some database migration tool, such as south (only for django), simple-db-migration (only for one type of database, maybe PostreSQL?) and SQLAlchemy (I haven\'t finished learning it, just feeling it somewhat

Default row order in SELECT query - SQL Server 2008 vs SQL 2012

a 夏天 提交于 2019-11-26 04:51:40
问题 Our team recently upgraded our databases from SQL Server 2008 to SQL Server 2012. One breaking change we noticed was in the default order of rows returned by the SELECT statement, i.e. when an explicit ORDER BY clause is not specified. As per MSDN, SQL Server 2012 does not gaurantee the order of the rows returned unless an ORDER BY clause is specified. We have 2500+ stored procedures across 5 databases that have SELECT statements without an ORDER BY clause and it will be a sizeable effort to

Reset Entity-Framework Migrations

只谈情不闲聊 提交于 2019-11-26 00:45:16
问题 I\'ve mucked up my migrations, I used IgnoreChanges on the initial migration, but now I want to delete all my migrations and start with an initial migration with all of the logic. When I delete the migrations in the folder and try and Add-Migration it doesn\'t generate a full file (it\'s empty - because I haven\'t made any changes since my last, but now deleted, migration). Is there any Disable-Migrations command, so I can rerun Enable-Migrations ? 回答1: You need to : Delete the state: Delete