diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..23fd3be --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +src/db/ diff --git a/src/database.rb b/src/database.rb index 527ed0c..177e702 100644 --- a/src/database.rb +++ b/src/database.rb @@ -5,7 +5,8 @@ require_relative "db_models.rb" class Table attr_reader :name attr_accessor :db - def initialize(db, name) + + def initialize(db, name, sql_file) @db = db @name = name end @@ -13,12 +14,12 @@ end class Database # Database class attr_reader :name, :path - def initialize(name, table_structure, db_path=DEFAULT_DB_PATH) + attr_accessor :tables + def initialize(name, tables_names=[], db_path=DEFAULT_DB_PATH) @name = name @path = db_path - # generate table_structure if it doesn't exist - @tables = {} + @tables = [] # generate table objects end diff --git a/src/db/main.db b/src/db/main.db index e69de29..c2661ea 100644 Binary files a/src/db/main.db and b/src/db/main.db differ