Skip to content

Instantly share code, notes, and snippets.

@ricardochimal
Created November 12, 2009 01:30
Show Gist options
  • Save ricardochimal/232503 to your computer and use it in GitHub Desktop.
Save ricardochimal/232503 to your computer and use it in GitHub Desktop.
$ psql
=# create table bigtable ( id bigserial, name text );
NOTICE: CREATE TABLE will create implicit sequence "bigtable_id_seq" for serial column "bigtable.id"
CREATE TABLE
=# \d bigtable
Table "public.bigtable"
Column | Type | Modifiers
--------+--------+-------------------------------------------------------
id | bigint | not null default nextval('bigtable_id_seq'::regclass)
name | text |
=# \q
$ sequel -d postgres://postgres@localhost/taps
Class.new(Sequel::Migration) do
def up
create_table(:bigtable) do
Bignum :id, :null=>false
String :name, :text=>true
end
end
def down
drop_table(:bigtable)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment