I must use postgresql with foreign secrets to define associations in data to ensure that other platforms/applications would also have the ability to easily make use of the same database. Getting some type of ruby DSL to define database schema with migration support would be also great. Which framework can you recommend for me personally?

Can there be some type of framework for just handling database schema changes, migrations and versions separate of ORM?

Between ActiveRecord and DataMapper I'd find the latter. Both make use of the Active Record pattern, so you'll really get the database tables in objects without fancy domain logic, but DataMapper is much simpler to utilize, and it is thread-safe. There's also Sequel, but which I am unfamiliar with.

Should you prefer a framework to deal with migrations I'd advise merb. Althoug it is a complete web framework beginning 1.1 it may handle migrations for that three formerly pointed out ORM framework (including separate and auto migrations)

Take a look at DataMapper. I recently used it with Sinatra and used the application to Heroku. The only real SQL I needed to write was CREATE DATABASE. Anything else DataMapper deliver to me using the .auto_migrate! and .auto_upgrade! functionality.

The foreign key support is incorporated in the dm-constraints wordpress plugin.

Remember that DataMapper is within version .9.11.

M4DBI can also be of great interest. A minimal-level ORM which harnesses DBI to let you write raw SQL if you want.

It is possible to valid reason to not use ActiveRecord? It's type of a typical for Ruby...