Created
November 12, 2009 01:30
-
-
Save ricardochimal/232503 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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