We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test.rb
require "camping" require "active_record" Base = ActiveRecord::Base module Nuts module Models class Post < Base belongs_to :user end class Comment < Base; belongs_to :user; end class User < Base; end #class BasicFields < V 1.1 class BasicFields < ActiveRecord::Migration[4.2] def self.up create_table :blog_posts, :force => true do |t| t.integer :user_id, :null => false t.string :title, :limit => 255 t.text :body, :html_body t.timestamps end create_table :blog_users, :force => true do |t| t.string :username, :password end create_table :blog_comments, :force => true do |t| t.integer :post_id, :null => false t.string :username t.text :body, :html_body t.timestamps end User.create :username => "admin", :password => "camping" end def self.down drop_table :blog_posts drop_table :blog_users drop_table :blog_comments end end end end def Nuts.create Nuts::Models.create_schema end Camping::Models::Base.establish_connection :adapter => "sqlite3", :database => "example.db" Nuts.create
The text was updated successfully, but these errors were encountered:
No branches or pull requests
test.rb
The text was updated successfully, but these errors were encountered: