เปลี่ยนคอลัมน์ลู่นอกทางตัวอย่างเช่น
def change
change_column(:table_name, :column_name, :new_type)
end
วิธีที่จะสร้างภาษา sql โต๊ะในรูบี้
def self.create_table
sql = <<-SQL
CREATE TABLE IF NOT EXISTS IF NOT EXISTS students (
name TEXT,
grade TEXT
)
SQL
DB[:conn].execute(sql)
end