doc/bin_sequel.rdoc in sequel-4.49.0 vs doc/bin_sequel.rdoc in sequel-5.0.0

- old
+ new

@@ -8,14 +8,12 @@ == Running from a git checkout If you've installed the sequel gem, then just running "sequel" should load the program, since rubygems should place the sequel binary in your load path. However, if you want to run bin/sequel from the root of a repository checkout, you should probably do: - ruby -I lib bin/sequel + ruby bin/sequel -The -I lib makes sure that you are using the repository checkout's code. - == Choosing the Database to Connect to === Connection String In general, you probably want to provide a connection string argument to bin/sequel, indicating the adapter and database connection information you want to use. For example: @@ -89,10 +87,12 @@ sequel -d postgres://host/database > /path/to/migrations/dir/001_base_schema.rb The -d option dumps the migration in database-independent format, the -D option dumps it in database-specific format. +Note that the support for dumping schema is fairly limited. It doesn't handle database views, functions, triggers, schemas, partial indexes, functional indexes, and many other things. You should probably use the database specific tools to handle those. + The -S option dumps the schema cache for all tables in the database, which can speed up the usage of Sequel with models when using the schema_caching extension. You should provide this option with the path to which to dump the schema: sequel -S /path/to/schema_cache.db postgres://host/database === Copy Databases @@ -100,9 +100,11 @@ Using the -C option, Sequel can copy the contents of one database to another, even between different database types. Using this option, you provide two connection strings on the command line: sequel -C mysql://host1/database postgres://host2/database2 This copies the table structure, table data, indexes, and foreign keys from the MySQL database to the PostgreSQL database. + +Note that the support for copying is fairly limited. It doesn't handle database views, functions, triggers, schemas, partial indexes, functional indexes, and many other things. Also, the data type conversion may not be exactly what you want. It is best designed for quick conversions and testing. For serious production use, use the database's tools to copy databases for the same database type, and for different database types, use the Sequel API. == Other Options Other options not mentioned above are explained briefly here.