varchar Migration question for Ruby on Rails

The correct format would be t.string :note, :limit => 1000 make sure you are using a version of MySQL(or whichever database) which supports varchars longer than 256 characters. if you want to use a large text block it would be t.text :note See http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html for more information

Upgrading SQL Server 6.5

Hey, I’m still stuck in that camp too. The third party application we have to support is FINALLY going to 2K5, so we’re almost out of the wood. But I feel your pain 8^D That said, from everything I heard from our DBA, the key is to convert the database to 8.0 format first, and … Read more

error creating migration in laravel: ‘failed to open stream’

I get this error on regular basis, here are some things that might help: php artisan cache:clear or delete the cache manually in the bootstrap directory (it is responsible for the route and services cache. also these methods could help: composer dump-autoload -o composer update Composer dump-autoload regenerates the list of all classes that need … Read more

Liquibase or Flyway database migration alternative for Elasticsearch

From this point of view/need, ES have a huge limitations: despite having dynamic mapping, ES is not schemaless but schema-intensive. Mappings cant be changed in case when this change conflicting with existing documents (practically, if any of documents have not-null field which new mapping affects, this will result in exception) documents in ES is immutable: … Read more

Laravel relationships in migrations?

When creating a migration you can specify foreign keys on your tables, i.e. public function up() { Schema::table(‘roles’, function(Blueprint $table) { $table->increments(‘id’); $table->integer(‘user_id’)->unsigned(); //rest of fields then… $table->foreign(‘user_id’)->references(‘id’)->on(‘users’); }); } This will create a foreign key on the user_id column on the roles table. The benefits of foreign keys is that when an update or … Read more

Is AppData now the ‘correct’ place to install user-specific apps (which modify their own data)?

Not really. The directory that serves as a common repository for application-specific data for the current roaming user. AppData is, surprisingly, for application data, not for installation (Click Once/Silverlight applications aside). You can, and should still install into Program Files, just don’t expect to write into that folder. You can install software into AppData if … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)