lib/rmvc/migrations.rb
# Method: create_table
# Arguments: table (string)
# Creates a table in the database
create_table
Arguments: table (string)
Creates a table in the database
create_table Arguments : table ( string ) Creates a table in the database
def create_table(table)
      puts "attempting to create table #{table}..."
      begin
        tt = @dbr.prepare("CREATE TABLE #{table}(id INTEGER PRIMARY KEY);")
        ee = tt.execute
        puts "table created correctly.".green
      rescue
        puts "error while creating table #{table}".red
        exit
      end
    end
def create_table ( table ) puts "attempting to create table #{table}..." begin tt = @dbr . prepare ( "CREATE TABLE #{table}(id INTEGER PRIMARY KEY);" ) ee = tt . execute puts "table created correctly." . green rescue puts "error while creating table #{table}" . red exit end end
Method: create_table
Arguments: table (string)
Creates a table in the database
Method : create_table Arguments : table ( string ) Creates a table in the database
table
<not_specific>