lib/knj/knjdb/drivers/sqlite3/knjdb_sqlite3_tables.rb in knjrbfw-0.0.14 vs lib/knj/knjdb/drivers/sqlite3/knjdb_sqlite3_tables.rb in knjrbfw-0.0.15
- old
+ new
@@ -103,11 +103,11 @@
#end
end
end
def create_column_programmatic(col_data)
- temp_name = "temptable_#{Knj::Php.md5(Knj::Datet.new.time.to_f)}"
+ temp_name = "temptable_#{Time.now.to_f.to_s.hash}"
cloned_tabled = self.clone(temp_name)
cols_cur = self.columns
@db.query("DROP TABLE `#{self.name}`")
sql = "CREATE TABLE `#{self.name}` ("
@@ -160,10 +160,10 @@
@db.query(sql)
return @db.tables[newname]
end
def copy(args = {})
- temp_name = "temptable_#{Knj::Php.md5(Knj::Datet.new.time.to_f)}"
+ temp_name = "temptable_#{Time.now.to_f.to_s.hash}"
cloned_tabled = self.clone(temp_name)
cols_cur = self.columns
@db.query("DROP TABLE `#{self.name}`")
sql = "CREATE TABLE `#{self.name}` ("
\ No newline at end of file