archiving 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +4 -0
- data/Rakefile +38 -0
- data/lib/archiving/archive_table.rb +108 -0
- data/lib/archiving/migrations.rb +16 -0
- data/lib/archiving/railtie.rb +12 -0
- data/lib/archiving.rb +3 -0
- data/test/archive_table_test.rb +195 -0
- data/test/archiving_test.rb +7 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/log_day.rb +8 -0
- data/test/dummy/app/models/log_line.rb +6 -0
- data/test/dummy/app/models/post.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config/application.rb +24 -0
- data/test/dummy/config/boot.rb +4 -0
- data/test/dummy/config/database.yml +28 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +32 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +44 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +56 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/migrate/20140220134827_create_posts.rb +10 -0
- data/test/dummy/db/migrate/20140220140852_posts_archive.rb +10 -0
- data/test/dummy/db/migrate/20140220140952_posts_tag.rb +6 -0
- data/test/dummy/db/migrate/20140317201702_create_logs.rb +22 -0
- data/test/dummy/db/migrate/20140414124125_create_postable_on_log_day.rb +8 -0
- data/test/dummy/db/schema.rb +56 -0
- data/test/dummy/log/development.log +15 -0
- data/test/dummy/log/test.log +20234 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/unit/post_test.rb +7 -0
- data/test/migrations_test.rb +58 -0
- data/test/test_helper.rb +17 -0
- metadata +257 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
data/test/dummy/bin/rake
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(*Rails.groups)
|
8
|
+
require 'archiving'
|
9
|
+
|
10
|
+
module Dummy
|
11
|
+
class Application < Rails::Application
|
12
|
+
# Settings in config/environments/* take precedence over those specified here.
|
13
|
+
# Application configuration should go into files in config/initializers
|
14
|
+
# -- all .rb files in that directory are automatically loaded.
|
15
|
+
|
16
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
17
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
18
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
19
|
+
|
20
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
21
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
22
|
+
# config.i18n.default_locale = :de
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
development:
|
7
|
+
adapter: mysql2
|
8
|
+
host: localhost
|
9
|
+
database: archiving_development
|
10
|
+
username: root
|
11
|
+
password:
|
12
|
+
|
13
|
+
# Warning: The database defined as "test" will be erased and
|
14
|
+
# re-generated from your development database when you run "rake".
|
15
|
+
# Do not set this db to the same as development or production.
|
16
|
+
test:
|
17
|
+
adapter: mysql2
|
18
|
+
host: localhost
|
19
|
+
database: archiving_test
|
20
|
+
username: root
|
21
|
+
password:
|
22
|
+
|
23
|
+
production:
|
24
|
+
adapter: mysql2
|
25
|
+
host: localhost
|
26
|
+
database: archiving_production
|
27
|
+
username: root
|
28
|
+
password:
|
@@ -0,0 +1,32 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
|
+
|
12
|
+
# Show full error reports and disable caching.
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send.
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Raise an error on page load if there are pending migrations
|
23
|
+
config.active_record.migration_error = :page_load
|
24
|
+
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
28
|
+
config.assets.debug = true
|
29
|
+
|
30
|
+
# Raises error for missing translations
|
31
|
+
# config.action_view.raise_on_missing_translations = true
|
32
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# Code is not reloaded between requests.
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both thread web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
+
# config.action_dispatch.rack_cache = true
|
21
|
+
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
+
config.serve_static_assets = false
|
24
|
+
|
25
|
+
# Compress JavaScripts and CSS.
|
26
|
+
config.assets.js_compressor = :uglifier
|
27
|
+
# config.assets.css_compressor = :sass
|
28
|
+
|
29
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
30
|
+
config.assets.compile = false
|
31
|
+
|
32
|
+
# Generate digests for assets URLs.
|
33
|
+
config.assets.digest = true
|
34
|
+
|
35
|
+
# Version of your assets, change this if you want to expire all your assets.
|
36
|
+
config.assets.version = '1.0'
|
37
|
+
|
38
|
+
# Specifies the header that your server uses for sending files.
|
39
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
40
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
41
|
+
|
42
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
43
|
+
# config.force_ssl = true
|
44
|
+
|
45
|
+
# Set to :debug to see everything in the log.
|
46
|
+
config.log_level = :info
|
47
|
+
|
48
|
+
# Prepend all log lines with the following tags.
|
49
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
50
|
+
|
51
|
+
# Use a different logger for distributed setups.
|
52
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
53
|
+
|
54
|
+
# Use a different cache store in production.
|
55
|
+
# config.cache_store = :mem_cache_store
|
56
|
+
|
57
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
58
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
59
|
+
|
60
|
+
# Precompile additional assets.
|
61
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
62
|
+
# config.assets.precompile += %w( search.js )
|
63
|
+
|
64
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
65
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
66
|
+
# config.action_mailer.raise_delivery_errors = false
|
67
|
+
|
68
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
69
|
+
# the I18n.default_locale when a translation can not be found).
|
70
|
+
config.i18n.fallbacks = true
|
71
|
+
|
72
|
+
# Send deprecation notices to registered listeners.
|
73
|
+
config.active_support.deprecation = :notify
|
74
|
+
|
75
|
+
# Disable automatic flushing of the log to improve performance.
|
76
|
+
# config.autoflush_log = false
|
77
|
+
|
78
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
79
|
+
config.log_formatter = ::Logger::Formatter.new
|
80
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
+
if config.respond_to?(:public_file_server)
|
17
|
+
config.public_file_server.enabled = true
|
18
|
+
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
|
19
|
+
else
|
20
|
+
config.serve_static_files = true
|
21
|
+
config.static_cache_control = "public, max-age=3600"
|
22
|
+
end
|
23
|
+
|
24
|
+
# Show full error reports and disable caching.
|
25
|
+
config.consider_all_requests_local = true
|
26
|
+
config.action_controller.perform_caching = false
|
27
|
+
|
28
|
+
# Raise exceptions instead of rendering exception templates.
|
29
|
+
config.action_dispatch.show_exceptions = false
|
30
|
+
|
31
|
+
# Disable request forgery protection in test environment.
|
32
|
+
config.action_controller.allow_forgery_protection = false
|
33
|
+
|
34
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
35
|
+
# The :test delivery method accumulates sent emails in the
|
36
|
+
# ActionMailer::Base.deliveries array.
|
37
|
+
config.action_mailer.delivery_method = :test
|
38
|
+
|
39
|
+
# Print deprecation notices to the stderr.
|
40
|
+
config.active_support.deprecation = :stderr
|
41
|
+
|
42
|
+
# Raises error for missing translations
|
43
|
+
# config.action_view.raise_on_missing_translations = true
|
44
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure your secret_key_base is kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
Dummy::Application.config.secret_key_base = '8f31f8be3b968fcf547195e5adb6a271b247a0697e4b4b88021dd0f01ce15db5fa087c6d5778d0880a146369ea494a6464a19cd4d182027792b555f3ac36c2c8'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,56 @@
|
|
1
|
+
Dummy::Application.routes.draw do
|
2
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
3
|
+
# See how all your routes lay out with "rake routes".
|
4
|
+
|
5
|
+
# You can have the root of your site routed with "root"
|
6
|
+
# root 'welcome#index'
|
7
|
+
|
8
|
+
# Example of regular route:
|
9
|
+
# get 'products/:id' => 'catalog#view'
|
10
|
+
|
11
|
+
# Example of named route that can be invoked with purchase_url(id: product.id)
|
12
|
+
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
13
|
+
|
14
|
+
# Example resource route (maps HTTP verbs to controller actions automatically):
|
15
|
+
# resources :products
|
16
|
+
|
17
|
+
# Example resource route with options:
|
18
|
+
# resources :products do
|
19
|
+
# member do
|
20
|
+
# get 'short'
|
21
|
+
# post 'toggle'
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# collection do
|
25
|
+
# get 'sold'
|
26
|
+
# end
|
27
|
+
# end
|
28
|
+
|
29
|
+
# Example resource route with sub-resources:
|
30
|
+
# resources :products do
|
31
|
+
# resources :comments, :sales
|
32
|
+
# resource :seller
|
33
|
+
# end
|
34
|
+
|
35
|
+
# Example resource route with more complex sub-resources:
|
36
|
+
# resources :products do
|
37
|
+
# resources :comments
|
38
|
+
# resources :sales do
|
39
|
+
# get 'recent', on: :collection
|
40
|
+
# end
|
41
|
+
# end
|
42
|
+
|
43
|
+
# Example resource route with concerns:
|
44
|
+
# concern :toggleable do
|
45
|
+
# post 'toggle'
|
46
|
+
# end
|
47
|
+
# resources :posts, concerns: :toggleable
|
48
|
+
# resources :photos, concerns: :toggleable
|
49
|
+
|
50
|
+
# Example resource route within a namespace:
|
51
|
+
# namespace :admin do
|
52
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
53
|
+
# # (app/controllers/admin/products_controller.rb)
|
54
|
+
# resources :products
|
55
|
+
# end
|
56
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class CreateLogs < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :log_days do |t|
|
4
|
+
t.references :post
|
5
|
+
t.date :day
|
6
|
+
end
|
7
|
+
create_table :log_days_archive do |t|
|
8
|
+
t.references :post
|
9
|
+
t.date :day
|
10
|
+
end
|
11
|
+
|
12
|
+
create_table :log_lines do |t|
|
13
|
+
t.references :log_day
|
14
|
+
t.string :descr
|
15
|
+
end
|
16
|
+
create_table :log_lines_archive do |t|
|
17
|
+
t.references :log_day
|
18
|
+
t.string :descr
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 20140414124125) do
|
15
|
+
|
16
|
+
create_table "log_days", :force => true do |t|
|
17
|
+
t.integer "post_id"
|
18
|
+
t.date "day"
|
19
|
+
t.string "postable_type"
|
20
|
+
t.integer "postable_id"
|
21
|
+
end
|
22
|
+
|
23
|
+
create_table "log_days_archive", :force => true do |t|
|
24
|
+
t.integer "post_id"
|
25
|
+
t.date "day"
|
26
|
+
t.string "postable_type"
|
27
|
+
t.integer "postable_id"
|
28
|
+
end
|
29
|
+
|
30
|
+
create_table "log_lines", :force => true do |t|
|
31
|
+
t.integer "log_day_id"
|
32
|
+
t.string "descr"
|
33
|
+
end
|
34
|
+
|
35
|
+
create_table "log_lines_archive", :force => true do |t|
|
36
|
+
t.integer "log_day_id"
|
37
|
+
t.string "descr"
|
38
|
+
end
|
39
|
+
|
40
|
+
create_table "posts", :force => true do |t|
|
41
|
+
t.string "title"
|
42
|
+
t.text "body"
|
43
|
+
t.datetime "created_at", :null => false
|
44
|
+
t.datetime "updated_at", :null => false
|
45
|
+
t.string "tag"
|
46
|
+
end
|
47
|
+
|
48
|
+
create_table "posts_archive", :force => true do |t|
|
49
|
+
t.string "title"
|
50
|
+
t.text "body"
|
51
|
+
t.datetime "created_at", :null => false
|
52
|
+
t.datetime "updated_at", :null => false
|
53
|
+
t.string "tag"
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
[1m[36m (11.1ms)[0m [1mCREATE TABLE `log_days` (`id` int(11) auto_increment PRIMARY KEY, `post_id` int(11), `day` date, `postable_type` varchar(255), `postable_id` int(11)) ENGINE=InnoDB[0m
|
2
|
+
[1m[35m (7.0ms)[0m CREATE TABLE `log_days_archive` (`id` int(11) auto_increment PRIMARY KEY, `post_id` int(11), `day` date, `postable_type` varchar(255), `postable_id` int(11)) ENGINE=InnoDB
|
3
|
+
[1m[36m (7.5ms)[0m [1mCREATE TABLE `log_lines` (`id` int(11) auto_increment PRIMARY KEY, `log_day_id` int(11), `descr` varchar(255)) ENGINE=InnoDB[0m
|
4
|
+
[1m[35m (8.7ms)[0m CREATE TABLE `log_lines_archive` (`id` int(11) auto_increment PRIMARY KEY, `log_day_id` int(11), `descr` varchar(255)) ENGINE=InnoDB
|
5
|
+
[1m[36m (12.2ms)[0m [1mCREATE TABLE `posts` (`id` int(11) auto_increment PRIMARY KEY, `title` varchar(255), `body` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `tag` varchar(255)) ENGINE=InnoDB[0m
|
6
|
+
[1m[35m (7.6ms)[0m CREATE TABLE `posts_archive` (`id` int(11) auto_increment PRIMARY KEY, `title` varchar(255), `body` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `tag` varchar(255)) ENGINE=InnoDB
|
7
|
+
[1m[36m (8.6ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
8
|
+
[1m[35m (9.2ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
9
|
+
[1m[36m (0.3ms)[0m [1mSELECT version FROM `schema_migrations`[0m
|
10
|
+
[1m[35m (0.3ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20140414124125')
|
11
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20140220134827')[0m
|
12
|
+
[1m[35m (0.3ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20140220140852')
|
13
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20140220140952')[0m
|
14
|
+
[1m[35m (0.3ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20140317201702')
|
15
|
+
[1m[36m (3.0ms)[0m [1mDROP TABLE `log_days`[0m
|