netzke-basepack 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +9 -1
- data/README.md +5 -8
- data/Rakefile +0 -1
- data/lib/netzke/active_record/attributes.rb +13 -5
- data/lib/netzke/basepack.rb +0 -1
- data/lib/netzke/basepack/data_accessor.rb +76 -17
- data/lib/netzke/basepack/form_panel.rb +23 -34
- data/lib/netzke/basepack/form_panel/fields.rb +7 -0
- data/lib/netzke/basepack/form_panel/services.rb +6 -3
- data/lib/netzke/basepack/grid_panel/services.rb +2 -49
- data/lib/netzke/basepack/version.rb +1 -1
- data/netzke-basepack.gemspec +158 -154
- data/test/{rails_app → basepack_test_app}/.gitignore +2 -1
- data/test/basepack_test_app/.rvmrc +1 -0
- data/test/{rails_app → basepack_test_app}/Gemfile +2 -3
- data/test/{rails_app → basepack_test_app}/Gemfile.lock +80 -70
- data/test/{rails_app → basepack_test_app}/README +0 -0
- data/test/{rails_app → basepack_test_app}/Rakefile +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/author_form.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/author_grid.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_form.rb +3 -2
- data/test/{rails_app → basepack_test_app}/app/components/book_form_with_custom_fields.rb +0 -0
- data/test/basepack_test_app/app/components/book_form_with_defaults.rb +8 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_form_with_nested_attributes.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_grid.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_grid_loader.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_custom_columns.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_default_values.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_extra_feedback.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_extra_filters.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_nested_attributes.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_paging.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_persistence.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_scoped_authors.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_virtual_attributes.rb +1 -1
- data/test/{rails_app → basepack_test_app}/app/components/book_paging_form_panel.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_query_builder.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_search_panel.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_search_panel/javascripts/i18n_de.js +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/book_with_custom_primary_key_grid.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/books_bound_to_author.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/double_book_grid.rb +0 -0
- data/test/basepack_test_app/app/components/extras/book_presentation.rb +20 -0
- data/test/{rails_app → basepack_test_app}/app/components/form_without_model.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/generic_user_form.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/lockable_book_form.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/lockable_user_form.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/paging_form_with_search.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/simple_accordion.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/simple_panel.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/simple_tab_panel.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/simple_window.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/simple_wrapper.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/some_accordion_panel.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/some_auth_app.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/some_border_layout.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/some_simple_app.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/some_tab_panel.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/user_form.rb +1 -1
- data/test/{rails_app → basepack_test_app}/app/components/user_form_with_default_fields.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/user_grid.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/user_grid_with_customized_form_fields.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/components/window_component_loader.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/controllers/application_controller.rb +0 -0
- data/test/basepack_test_app/app/controllers/components_controller.rb +10 -0
- data/test/basepack_test_app/app/controllers/welcome_controller.rb +9 -0
- data/test/basepack_test_app/app/helpers/application_helper.rb +8 -0
- data/test/{rails_app → basepack_test_app}/app/helpers/embedded_components_helper.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/models/address.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/models/author.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/models/book.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/models/book_with_custom_primary_key.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/models/role.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/models/user.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/presenters/forms/generic_user.rb +0 -0
- data/test/{rails_app → basepack_test_app}/app/views/components/loadable_window.html.erb +0 -0
- data/test/{rails_app → basepack_test_app}/app/views/components/simple_panel.html.erb +0 -0
- data/test/basepack_test_app/app/views/layouts/application.html.erb +12 -0
- data/test/{rails_app/app/views/layouts/application.html.erb → basepack_test_app/app/views/layouts/components.html.erb} +0 -0
- data/test/{rails_app → basepack_test_app}/app/views/layouts/nested.html.erb +0 -0
- data/test/basepack_test_app/app/views/welcome/index.html.erb +10 -0
- data/test/{rails_app → basepack_test_app}/config.ru +0 -0
- data/test/{rails_app → basepack_test_app}/config/application.rb +7 -0
- data/test/{rails_app → basepack_test_app}/config/boot.rb +0 -0
- data/test/{rails_app → basepack_test_app}/config/cucumber.yml +0 -0
- data/test/{rails_app → basepack_test_app}/config/database.yml.sample +0 -0
- data/test/{rails_app → basepack_test_app}/config/environment.rb +0 -0
- data/test/{rails_app → basepack_test_app}/config/environments/development.rb +1 -1
- data/test/{rails_app → basepack_test_app}/config/environments/production.rb +0 -0
- data/test/{rails_app → basepack_test_app}/config/environments/test.rb +0 -0
- data/test/{rails_app → basepack_test_app}/config/initializers/backtrace_silencers.rb +0 -1
- data/test/{rails_app → basepack_test_app}/config/initializers/inflections.rb +0 -0
- data/test/{rails_app → basepack_test_app}/config/initializers/mime_types.rb +0 -0
- data/test/{rails_app → basepack_test_app}/config/initializers/netzke.rb +1 -1
- data/test/{rails_app → basepack_test_app}/config/initializers/secret_token.rb +0 -0
- data/test/{rails_app → basepack_test_app}/config/initializers/session_store.rb +1 -1
- data/test/{rails_app → basepack_test_app}/config/locales/de.yml +0 -0
- data/test/{rails_app → basepack_test_app}/config/locales/es.yml +0 -0
- data/test/{rails_app → basepack_test_app}/config/routes.rb +0 -0
- data/test/basepack_test_app/db/development_structure.sql +88 -0
- data/test/{rails_app → basepack_test_app}/db/migrate/20100914104207_create_users.rb +0 -0
- data/test/{rails_app → basepack_test_app}/db/migrate/20100914104236_create_roles.rb +0 -0
- data/test/{rails_app → basepack_test_app}/db/migrate/20101026185816_create_authors.rb +0 -0
- data/test/{rails_app → basepack_test_app}/db/migrate/20101026190021_create_books.rb +0 -0
- data/test/{rails_app → basepack_test_app}/db/migrate/20110101143818_create_addresses.rb +0 -0
- data/test/{rails_app → basepack_test_app}/db/migrate/20110213213050_create_netzke_component_states.rb +0 -0
- data/test/{rails_app → basepack_test_app}/db/migrate/20110701070052_create_book_with_custom_primary_keys.rb +0 -0
- data/test/basepack_test_app/db/migrate/20110901114016_add_last_read_at_to_books.rb +9 -0
- data/test/{rails_app → basepack_test_app}/db/schema.rb +4 -2
- data/test/{rails_app → basepack_test_app}/db/seeds.rb +0 -0
- data/test/{rails_app → basepack_test_app}/features/accordion_panel.feature +0 -0
- data/test/{rails_app → basepack_test_app}/features/components_in_view.feature +0 -0
- data/test/{rails_app → basepack_test_app}/features/form_panel.feature +15 -0
- data/test/{rails_app → basepack_test_app}/features/grid_panel.feature +0 -0
- data/test/{rails_app → basepack_test_app}/features/grid_panel_with_custom_primary_key.feature +0 -0
- data/test/basepack_test_app/features/grid_sorting.feature +39 -0
- data/test/{rails_app → basepack_test_app}/features/i18n.feature +0 -0
- data/test/{rails_app → basepack_test_app}/features/nested_attributes.feature +0 -0
- data/test/{rails_app → basepack_test_app}/features/paging_form_panel.feature +0 -1
- data/test/{rails_app → basepack_test_app}/features/search_in_grid.feature +0 -0
- data/test/{rails_app → basepack_test_app}/features/simple_app.feature +0 -0
- data/test/{rails_app → basepack_test_app}/features/simple_panel.feature +0 -0
- data/test/{rails_app → basepack_test_app}/features/step_definitions/accordion_steps.rb +0 -0
- data/test/{rails_app → basepack_test_app}/features/step_definitions/ext_steps.rb +0 -0
- data/test/{rails_app → basepack_test_app}/features/step_definitions/form_panel_steps.rb +4 -7
- data/test/{rails_app → basepack_test_app}/features/step_definitions/generic_steps.rb +0 -0
- data/test/{rails_app → basepack_test_app}/features/step_definitions/grid_panel_steps.rb +28 -5
- data/test/{rails_app → basepack_test_app}/features/step_definitions/pickle_steps.rb +0 -0
- data/test/{rails_app → basepack_test_app}/features/step_definitions/web_steps.rb +0 -0
- data/test/{rails_app → basepack_test_app}/features/support/env.rb +2 -5
- data/test/{rails_app → basepack_test_app}/features/support/paths.rb +0 -0
- data/test/{rails_app → basepack_test_app}/features/support/pickle.rb +0 -0
- data/test/{rails_app → basepack_test_app}/features/support/selectors.rb +0 -0
- data/test/{rails_app → basepack_test_app}/features/tab_panel.feature +0 -0
- data/test/{rails_app → basepack_test_app}/features/validations_in_grid.feature +0 -0
- data/test/{rails_app → basepack_test_app}/features/virtual_attributes.feature +0 -0
- data/test/{rails_app → basepack_test_app}/features/window.feature +0 -0
- data/test/{rails_app → basepack_test_app}/lib/tasks/.gitkeep +0 -0
- data/test/{rails_app → basepack_test_app}/lib/tasks/cucumber.rake +0 -0
- data/test/{rails_app → basepack_test_app}/public/404.html +0 -0
- data/test/{rails_app → basepack_test_app}/public/422.html +0 -0
- data/test/{rails_app → basepack_test_app}/public/500.html +0 -0
- data/test/{rails_app → basepack_test_app}/public/favicon.ico +0 -0
- data/test/{rails_app → basepack_test_app}/public/images/header-deco.gif +0 -0
- data/test/{rails_app → basepack_test_app}/public/images/rails.png +0 -0
- data/test/{rails_app → basepack_test_app}/public/javascripts/application.js +0 -0
- data/test/{rails_app → basepack_test_app}/public/javascripts/controls.js +0 -0
- data/test/{rails_app → basepack_test_app}/public/javascripts/dragdrop.js +0 -0
- data/test/{rails_app → basepack_test_app}/public/javascripts/effects.js +0 -0
- data/test/{rails_app → basepack_test_app}/public/javascripts/prototype.js +0 -0
- data/test/{rails_app → basepack_test_app}/public/javascripts/rails.js +0 -0
- data/test/{rails_app → basepack_test_app}/public/robots.txt +0 -0
- data/test/{rails_app → basepack_test_app}/public/stylesheets/.gitkeep +0 -0
- data/test/{rails_app → basepack_test_app}/script/cucumber +0 -0
- data/test/{rails_app → basepack_test_app}/script/rails +0 -0
- data/test/{rails_app → basepack_test_app}/spec/active_record/attributes_spec.rb +0 -0
- data/test/{rails_app → basepack_test_app}/spec/active_record/relation_extensions_spec.rb +0 -0
- data/test/{rails_app → basepack_test_app}/spec/components/form_panel_spec.rb +0 -0
- data/test/{rails_app → basepack_test_app}/spec/components/grid_panel_spec.rb +0 -0
- data/test/{rails_app → basepack_test_app}/spec/factories.rb +0 -0
- data/test/{rails_app → basepack_test_app}/spec/spec_helper.rb +0 -0
- data/test/{rails_app → basepack_test_app}/test/performance/browsing_test.rb +0 -0
- data/test/{rails_app → basepack_test_app}/test/test_helper.rb +0 -0
- data/test/{rails_app → basepack_test_app}/vendor/plugins/.gitkeep +0 -0
- metadata +198 -207
- data/test/rails_app/app/components/book_presentation.rb +0 -18
- data/test/rails_app/app/controllers/components_controller.rb +0 -6
- data/test/rails_app/app/controllers/welcome_controller.rb +0 -5
- data/test/rails_app/app/helpers/application_helper.rb +0 -2
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,7 +2,7 @@
|
|
2
2
|
class BookForm < Netzke::Basepack::FormPanel
|
3
3
|
js_property :title, Book.model_name.human
|
4
4
|
|
5
|
-
include BookPresentation
|
5
|
+
include Extras::BookPresentation
|
6
6
|
|
7
7
|
def configuration
|
8
8
|
super.merge(
|
@@ -17,6 +17,7 @@ class BookForm < Netzke::Basepack::FormPanel
|
|
17
17
|
:digitized,
|
18
18
|
:exemplars,
|
19
19
|
{:name => :in_abundance, :getter => in_abundance_getter, :xtype => :displayfield},
|
20
|
+
{:name => :updated_at}
|
20
21
|
# WIP: commalistcbg is kind of broken, giving an Ext error
|
21
22
|
# {:name => :tags, :xtype => :commalistcbg, :options => %w(read cool recommend buy)},
|
22
23
|
# WIP: waithing on nradiogroup
|
@@ -28,7 +29,7 @@ class BookForm < Netzke::Basepack::FormPanel
|
|
28
29
|
js_method :init_component, <<-JS
|
29
30
|
function(){
|
30
31
|
this.callParent();
|
31
|
-
this.on('submitsuccess', function(){ this.
|
32
|
+
this.on('submitsuccess', function(){ this.netzkeFeedback('Suc'+'cess!')}, this);
|
32
33
|
}
|
33
34
|
JS
|
34
35
|
|
File without changes
|
data/test/{rails_app → basepack_test_app}/app/components/book_form_with_nested_attributes.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_nested_attributes.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/{rails_app → basepack_test_app}/app/components/book_search_panel/javascripts/i18n_de.js
RENAMED
File without changes
|
data/test/{rails_app → basepack_test_app}/app/components/book_with_custom_primary_key_grid.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Extras
|
2
|
+
module BookPresentation
|
3
|
+
# A setter that creates an author on the fly
|
4
|
+
def author_first_name_setter
|
5
|
+
lambda do |r,v|
|
6
|
+
if v.is_a?(Integer)
|
7
|
+
r.author = Author.find(v)
|
8
|
+
else
|
9
|
+
r.author = Author.create(:first_name => v)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# A getter that returns "YES" if exemplars are more than 3, "NO" otherwise
|
15
|
+
def in_abundance_getter
|
16
|
+
lambda {|r| r.exemplars.to_i > 3 ? "YES" : "NO"}
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -5,7 +5,7 @@ class UserForm < Netzke::Basepack::FormPanel
|
|
5
5
|
sup = super
|
6
6
|
sup.merge({
|
7
7
|
:model => 'User',
|
8
|
-
:record_id => User.first.id,
|
8
|
+
:record_id => User.first.try(:id),
|
9
9
|
:items => [
|
10
10
|
{:xtype => 'fieldset', :title => "Basic Info", :checkboxToggle => true, :items => [
|
11
11
|
:first_name,
|
File without changes
|
File without changes
|
data/test/{rails_app → basepack_test_app}/app/components/user_grid_with_customized_form_fields.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class ComponentsController < ApplicationController
|
2
|
+
def index
|
3
|
+
if params[:component]
|
4
|
+
component_name = params[:component].gsub("::", "_").underscore
|
5
|
+
render :inline => "<%= netzke :#{component_name}, :class_name => '#{params[:component]}', :height => 400 %>", :layout => true
|
6
|
+
else
|
7
|
+
redirect_to root_path
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class WelcomeController < ApplicationController
|
2
|
+
|
3
|
+
def index
|
4
|
+
@components = @@component_list
|
5
|
+
end
|
6
|
+
|
7
|
+
# Build components list from basepack_test_app/app/components
|
8
|
+
@@component_list ||= Dir.glob(File.expand_path('../../components/*.rb', __FILE__)).map{ |name| File.basename(name, ".rb") }.map(&:camelize)
|
9
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
module ApplicationHelper
|
2
|
+
|
3
|
+
# Accepts a component class, returns the link to its code on github.
|
4
|
+
def link_to_component_code(component)
|
5
|
+
link_to("code", [RailsApp::Application.config.repo_root, "/app/components/", component.to_s.underscore, ".rb"].join)
|
6
|
+
end
|
7
|
+
|
8
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<h1>Test app bundled with Netzke Basepack</h1>
|
2
|
+
<h3>Available test components</h3>
|
3
|
+
<table>
|
4
|
+
<%- for component in @components do -%>
|
5
|
+
<tr>
|
6
|
+
<td><%= link_to component, components_path(:component => component) %></td>
|
7
|
+
<td><%= link_to_component_code(component) %></td>
|
8
|
+
</tr>
|
9
|
+
<%- end -%>
|
10
|
+
</table>
|
File without changes
|
@@ -46,5 +46,12 @@ module RailsApp
|
|
46
46
|
|
47
47
|
# config.netzke.basepack.grid_panel.edit_in_form_available = false
|
48
48
|
# config.netzke.basepack.grid_panel.extended_search_available = false
|
49
|
+
|
50
|
+
# to build links to the code on github
|
51
|
+
config.repo_root = "https://github.com/skozlov/netzke-basepack/blob/master/test/basepack_test_app"
|
52
|
+
|
53
|
+
# Enable the asset pipeline
|
54
|
+
config.assets.enabled = true
|
55
|
+
|
49
56
|
end
|
50
57
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -11,7 +11,7 @@ RailsApp::Application.configure do
|
|
11
11
|
|
12
12
|
# Show full error reports and disable caching
|
13
13
|
config.consider_all_requests_local = true
|
14
|
-
config.action_view.debug_rjs = true
|
14
|
+
# config.action_view.debug_rjs = true
|
15
15
|
config.action_controller.perform_caching = false
|
16
16
|
|
17
17
|
# Don't care if the mailer can't send
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
RailsApp::Application.config.session_store :cookie_store, :key => '
|
3
|
+
RailsApp::Application.config.session_store :cookie_store, :key => '_basepack_test_app_session'
|
4
4
|
|
5
5
|
# Use the database for sessions instead of the cookie-based default,
|
6
6
|
# which shouldn't be used to store highly confidential information
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,88 @@
|
|
1
|
+
CREATE TABLE `addresses` (
|
2
|
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
3
|
+
`user_id` int(11) DEFAULT NULL,
|
4
|
+
`street` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
5
|
+
`city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
6
|
+
`postcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
7
|
+
`country_id` int(11) DEFAULT NULL,
|
8
|
+
`created_at` datetime DEFAULT NULL,
|
9
|
+
`updated_at` datetime DEFAULT NULL,
|
10
|
+
PRIMARY KEY (`id`)
|
11
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
12
|
+
|
13
|
+
CREATE TABLE `authors` (
|
14
|
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
15
|
+
`first_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
16
|
+
`last_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
17
|
+
`created_at` datetime DEFAULT NULL,
|
18
|
+
`updated_at` datetime DEFAULT NULL,
|
19
|
+
PRIMARY KEY (`id`)
|
20
|
+
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
21
|
+
|
22
|
+
CREATE TABLE `books` (
|
23
|
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
24
|
+
`author_id` int(11) DEFAULT NULL,
|
25
|
+
`title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
26
|
+
`exemplars` int(11) DEFAULT NULL,
|
27
|
+
`digitized` tinyint(1) DEFAULT NULL,
|
28
|
+
`notes` text COLLATE utf8_unicode_ci,
|
29
|
+
`tags` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
30
|
+
`rating` int(11) DEFAULT NULL,
|
31
|
+
`created_at` datetime DEFAULT NULL,
|
32
|
+
`updated_at` datetime DEFAULT NULL,
|
33
|
+
PRIMARY KEY (`id`)
|
34
|
+
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
35
|
+
|
36
|
+
CREATE TABLE `netzke_component_states` (
|
37
|
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
38
|
+
`component` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
39
|
+
`user_id` int(11) DEFAULT NULL,
|
40
|
+
`role_id` int(11) DEFAULT NULL,
|
41
|
+
`value` text COLLATE utf8_unicode_ci,
|
42
|
+
`created_at` datetime DEFAULT NULL,
|
43
|
+
`updated_at` datetime DEFAULT NULL,
|
44
|
+
PRIMARY KEY (`id`),
|
45
|
+
KEY `index_netzke_component_states_on_component` (`component`),
|
46
|
+
KEY `index_netzke_component_states_on_user_id` (`user_id`),
|
47
|
+
KEY `index_netzke_component_states_on_role_id` (`role_id`)
|
48
|
+
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
49
|
+
|
50
|
+
CREATE TABLE `netzke_temp_table` (
|
51
|
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
52
|
+
PRIMARY KEY (`id`)
|
53
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
54
|
+
|
55
|
+
CREATE TABLE `roles` (
|
56
|
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
57
|
+
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
58
|
+
`created_at` datetime DEFAULT NULL,
|
59
|
+
`updated_at` datetime DEFAULT NULL,
|
60
|
+
PRIMARY KEY (`id`)
|
61
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
62
|
+
|
63
|
+
CREATE TABLE `schema_migrations` (
|
64
|
+
`version` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
65
|
+
UNIQUE KEY `unique_schema_migrations` (`version`)
|
66
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
67
|
+
|
68
|
+
CREATE TABLE `users` (
|
69
|
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
70
|
+
`first_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
71
|
+
`last_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
72
|
+
`role_id` int(11) DEFAULT NULL,
|
73
|
+
`created_at` datetime DEFAULT NULL,
|
74
|
+
`updated_at` datetime DEFAULT NULL,
|
75
|
+
PRIMARY KEY (`id`)
|
76
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
77
|
+
|
78
|
+
INSERT INTO schema_migrations (version) VALUES ('20100914104207');
|
79
|
+
|
80
|
+
INSERT INTO schema_migrations (version) VALUES ('20100914104236');
|
81
|
+
|
82
|
+
INSERT INTO schema_migrations (version) VALUES ('20101026185816');
|
83
|
+
|
84
|
+
INSERT INTO schema_migrations (version) VALUES ('20101026190021');
|
85
|
+
|
86
|
+
INSERT INTO schema_migrations (version) VALUES ('20110101143818');
|
87
|
+
|
88
|
+
INSERT INTO schema_migrations (version) VALUES ('20110213213050');
|