migration

Convert Subversion repository to Mercurial

泄露秘密 提交于 2020-01-02 13:11:36
问题 I am trying to convert an SVN repository to Mercurial, but I'm having some troubles. These are the steps I've taken: (I am on Windows) Turned on "convert" in the extensions Opened a command window, and typed: hg convert http://myversioncontrorepositoryhere It says it's initializing the destination folder and then asks: Enter username for Administration at http://myversioncontrorepositoryhere: type my username then in Administration at http://myversioncontrorepositoryhere: I assume this is my

Importing a MySQL schema to Xcode as a CoreData Data Model

孤街醉人 提交于 2020-01-02 12:25:33
问题 I have an existing MySQL database, I would like to import the schema into Xcode and create a Core Data data model. Is there a way (tool, process) to import the CREATE statements so I don't have to build the models "by hand"? As an intermediary step I could convert to SQLite, I'm not worried about the relationships, foreign keys etc just auto-generating the Entities (Tables) and Properties (Columns). 回答1: Actually I needed the feature so badly too that I have decided to make an OSX utility to

Rails 3 - DB seed data validation

为君一笑 提交于 2020-01-02 09:55:56
问题 I am seeding a test database in Rails 3.1 through thousands of create calls in the seeds.rb file. A little problem arises when these calls do not pass the model validations: rails will not notify me this, and the seeding goes on correctly until the end of the file. At the end of the process I do not know which records have been created and which aren't, unless I check them one by one ... Is there a way to get notified when records do not pass validations when using rake db:seed or rake db

Lumen error when using artisan migrate

我怕爱的太早我们不能终老 提交于 2020-01-02 05:50:28
问题 I'm new to Lumen and when I try to use: php artisan migrate I get the following error. [PDOException] SQLSTATE[HY000] [2002] No such file or directory If I change 'localhost' to '127.0.0.1' I get this error: [PDOException] SQLSTATE[HY000] [2002] Connection refused If I use: php artisan migrate --database=Lumen I get: [InvalidArgumentException] Database [Lumen] not configured. Here is my .env file DB_CONNECTION=mysql DB_HOST=localhost DB_PORT=3306 DB_DATABASE=Lumen DB_USERNAME=root DB_PASSWORD

ClearCase to SVN migration

江枫思渺然 提交于 2020-01-02 05:46:11
问题 Well I have an issue with SVN importer tool for migrating one of the ClearCase VOB which has a huge history ..we thought of doing this by picking up like 10 -15 baseline versions of the code and import it to SVN. So for doing that I think the user has to give me the specific versions one by one . So now he is asking me how to point a specific version in clearcase and export it ?? .The idea here is to give me the code as tar ball ...so that I can explode it on my desktop and import it then to

Variable variables handling order: changes in PHP 7

天大地大妈咪最大 提交于 2020-01-01 19:07:29
问题 With the new PHP 7.0.0 out now, I'm a bit worried about the changes in evaluation order of the so-called 'variable variables'. On this page, under 'Changes to variable handling', a table is displayed with examples of expressions with their handling order in PHP 5 and PHP 7. The four expressions listed are: $$foo['bar']['baz'] $foo->$bar['baz'] $foo->$bar['baz']() Foo::$bar['baz']() Given the following string and array: $qux = 'quux'; $foo = array('bar' => array('baz' => 'qux')); the first

Google Code svn migration

此生再无相见时 提交于 2020-01-01 16:23:08
问题 How to migrate from Google Code's subversion to another subversion server keeping the history? The problem here is that I don't have access to the repository of Google Code, nor to the one I will migrate. 回答1: You can 'svnsync' the data from Google code to a local repository on your pc. You can then use 'svnadmin' to create a dump file from that and send that to your new hosting provider or in some cases you can use svnsync to upload to the repository. The only public hosting I know that

How to redirect a URL by only changing the domain name, while keeping other URL parameters

拟墨画扇 提交于 2020-01-01 12:25:08
问题 I'm now migrating my website to a new host and domain, and I want to know if I can redirect anyone who enters any URL of the old website to the new website, while keeping all of the URL parameters. for example: When somebody types in this url http://www.domainA.com/blog/?p=667 , I want him to be redirected to http://www.domainB.com/blog/?p=667 . Is there any way I can do that by adding some .htaccess configurations? Thanks! 回答1: Try this in your .htaccess file: Options +FollowSymlinks

Can I use “Automatic Lightweight Migration” if my already release v1 didn't have a versioned Core Data model?

£可爱£侵袭症+ 提交于 2020-01-01 10:49:26
问题 Can I use "Automatic Lightweight Migration" if my already release v1 didn't have a versioned Core Data model? If yes, are there any key changed to the documented steps I need to apply? 回答1: Not only can you do this, in one sense it is the only way you can do this. From the Apple Documentation, "To create a versioned model, you start with a normal model..." Your v1 had a normal model. As long as you have that model, and you follow the steps linked in that tutorial to create a versioned model,

add a database column with Rails migration and populate it based on another column

半世苍凉 提交于 2020-01-01 09:22:11
问题 I'm writing a migration to add a column to a table. The value of the column is dependent on the value of two more existing columns. What is the best/fastest way to do this? Currently I have this but not sure if it's the best way since the groups table is can be very large. class AddColorToGroup < ActiveRecord::Migration def self.up add_column :groups, :color, :string Groups = Group.all.each do |g| c = "red" if g.is_active && is_live c = "green" if g.is_active c = "orange" g.update_attribute(