1
'auto_increment'를 테이블의 'another_id'라는 새 열에 추가해야하는 경우 어떻게해야합니까?
인가가 같은 옵션 :'auto_increment'를 레일스 테이블 정의에서 'id'이외의 다른 열에 추가하는 방법은 무엇입니까?
개발 내가 sqlite3를를 사용 ENV, 생산 ENV에서 MySQL은
create_table :posts do |t|
t.integer :another_id, :auto_increment => true # Is there a option like this?
...
t.timestamps
end
;
어떤 데이터베이스를 사용하고 있습니까? –
개발 env에서 sqlite3 및 mysql을 프로덕션 환경에서 사용합니다. – Croplio