database-migration

Oracle 11g Express error: ORA-12505, TNS: listener does not currently know of SID given in connect descriptor

故事扮演 提交于 2019-12-12 01:12:13
问题 I am facing problem with Oracle 11g Express hosted on Linux Centos 6.4. This server is relocated from one place to another, this relocation changes the IP of server. We have changed the IP in tnsname.ora and listerner.ora files. After these changes when we are trying to connect to database instance from server we are getting error “Connected to idle instance”. If we are trying it to connect from client using SQL developer we are getting error “Status : Failure -Test failed: Listener refused

How to migrate MS SQL database running on remote machine to my local MySQL database running on linux, preserving encoding

不羁的心 提交于 2019-12-12 01:09:09
问题 I have a remote Windows 10 machine running SQL Server (v12, Express edition) and I need to transfer one database to my machine, which is running MySQL database (MariaDB). MS SQL database contains special characters (Czech language diacritics) that get messed up if I try to use MySQL Workbench on the remote machine to migrate database to MySQL running on the same remote machine. How can I transfer database correctly? 回答1: Using MySQL Workbench, I have tried these combinations, none of them

Changing a weird Mysql query to Postgresql that uses group_concat

雨燕双飞 提交于 2019-12-11 20:08:51
问题 I'm moving our backend database from mysql to postgres and am in the process of migrating all of our old queries / functions. Most of them are trivial to do, but today I ran across one that has me scratching my head. Here it is: UPDATE k_coderound AS cr, k_coderound AS cr_m SET cr.is_correct = IF( (SELECT GROUP_CONCAT(option_id ORDER BY variable_id) AS `values` FROM k_value WHERE code_round_id=cr.id GROUP BY code_round_id) = (SELECT GROUP_CONCAT(option_id ORDER BY variable_id) AS `values`

Use custom logic in EF Code First migration

狂风中的少年 提交于 2019-12-11 19:06:49
问题 I have an existing Database with a some amount of data (i.e. DB is not empty). Now I made a decision to encrypt some sensitive data. I have a column TemplateBlocks : string . I'm going to replace it with new column TemplateBlocksEnc : byte[] and I did properly changed my Code First model. Then I generated migration and ... stuck! public partial class EncryptTemplateBlocks : DbMigration { public override void Up() { AddColumn("dbo.Devices", "TemplateBlocksEnc", c => c.Binary(nullable: true));

PHP Fatal Error on 'php artisan migrate' on remote AWS EB instance: laravel.log: Permission denied

只愿长相守 提交于 2019-12-11 17:27:28
问题 When I SSH into my AWS EB instance to run php artisan migrate , I get the following error message: Link to bigger size of picture below I am completely confused. First, I don't get this error on the local server. Second, what does a simple log file have to do with migrations anyway? They are ignored by git by default, so no log files are uploaded. Sigh... Any ideas on how I can be allowed to run my php artisan migrate ? 回答1: It's always the storage folder. Blank pages or permission denied, it

Weird ephemeral error for ManyToMany fields during Django migrations

青春壹個敷衍的年華 提交于 2019-12-11 17:14:39
问题 There's this weird error that my company has been facing since the last few months. We have a ton of model s in our code and a lot of them have ManyToMany fields in them. For ex - class TypeMapping(models.Model): name = models.TextField(null=True, blank=True) from_config_type = models.ManyToManyField(Type, blank=True, related_name="from_config_type") to_config_type = models.ManyToManyField(Type, blank=True, related_name="to_config_type") Sometimes, and only sometimes, after a deployment, we

Managed document not working in MarkLogic 10 after xdmp:document-insert

守給你的承諾、 提交于 2019-12-11 15:52:33
问题 First time manage document using dls:document-insert-and-manage Update the same document using xdmp:document-insert Document get lost from the dls latest version collection cts:search(/scopedIntervention/id , dls:documents-query()) First time manage document <scopedIntervention> <id>someId12345</id> <scopedInterventionName> First Name </scopedInterventionName> <forTestOnly> true </forTestOnly> <inactive> true </inactive> </scopedIntervention>)``` **Document inserted with versioning** Verify

Given I have to write the migration scripts myself, what value does Flyway provide?

情到浓时终转凉″ 提交于 2019-12-11 14:43:37
问题 In my situation I use a tool that generates SQL statements to contain all database init/create statements. How does Flyway provide value beyond what my tool provides? Why should I care to write hand-coded migration scripts to use Flyway? 回答1: The question above mixes two things that should be separate: the concept of database creation mixed with the concept of migration. database creation Given a complete database and an empty database, you can use many tools to generate the scripts needed to

Rails Database Association / Migration

回眸只為那壹抹淺笑 提交于 2019-12-11 13:36:55
问题 I'm learning rails and I'm trying to figure out database associations. If I have a database table with say Users that has an id, name, email, etc. and a Message table with the message, a sender (User) and recipient (also a User), how do I set up the migration and the models. Here, I'm using Rails 3.1. I'm pretty sure I can do it with just one User in the Message table with the references:User in the migration, but I'm not sure how to set up two of them. 回答1: Some resources to get you started:

EF 5 + Azure + MigrationFirst overrides database name. Why?

三世轮回 提交于 2019-12-11 13:18:24
问题 I created a database in Azure setting my own custom name. I then created EF 5 code first entities and added migrations. On application startup I called these two lines: Database.DefaultConnectionFactory = new SqlConnectionFactory(connectionString); Database.SetInitializer(new MigrateDatabaseToLatestVersion<MyDataContext, MyConfiguration>()); Connection string is taken straight from Azure: Server=tcp:xxx.database.windows.net,1433;Database=dbName;User ID=yyy;Password=zzz;Trusted_Connection