Last change
on this file since 7b7d827 was 7b7d827, checked in by njw <njw@…>, 11 years ago |
opened projects: hothotwrite and contact
|
-
Property mode
set to
100644
|
File size:
408 bytes
|
Line | |
---|
1 | class CreateContactgroups < ActiveRecord::Migration
|
---|
2 | def self.up
|
---|
3 | create_table :contactgroups do |t|
|
---|
4 | t.column :groupname, :string
|
---|
5 | t.column :contact_id, :integer, :null => false
|
---|
6 | end
|
---|
7 |
|
---|
8 | execute "alter table contactgroups add constraint fk_contactgroups_contacts
|
---|
9 | foreign key (contact_id) references contacts(id)"
|
---|
10 |
|
---|
11 | end
|
---|
12 |
|
---|
13 | def self.down
|
---|
14 | drop_table :contactgroups
|
---|
15 | end
|
---|
16 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.