Created
November 17, 2012 02:24
-
-
Save elebertus/4092734 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
#!/usr/bin/env ruby | |
require 'sqlite3' | |
db = SQLite3::Database.new( "test.db") | |
begin | |
db.query("SELECT * from dashboard_dashboard") | |
rescue | |
puts "dashboard_dashboard not found\nCreating table dashboard_dashboard\n" | |
db.execute("CREATE TABLE \"dashboard_dashboard\" ( | |
\"name\" varchar(128) NOT NULL PRIMARY KEY, | |
\"state\" text NOT NULL);" | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment