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.
Files changed (169) hide show
  1. data/CHANGELOG.rdoc +9 -1
  2. data/README.md +5 -8
  3. data/Rakefile +0 -1
  4. data/lib/netzke/active_record/attributes.rb +13 -5
  5. data/lib/netzke/basepack.rb +0 -1
  6. data/lib/netzke/basepack/data_accessor.rb +76 -17
  7. data/lib/netzke/basepack/form_panel.rb +23 -34
  8. data/lib/netzke/basepack/form_panel/fields.rb +7 -0
  9. data/lib/netzke/basepack/form_panel/services.rb +6 -3
  10. data/lib/netzke/basepack/grid_panel/services.rb +2 -49
  11. data/lib/netzke/basepack/version.rb +1 -1
  12. data/netzke-basepack.gemspec +158 -154
  13. data/test/{rails_app → basepack_test_app}/.gitignore +2 -1
  14. data/test/basepack_test_app/.rvmrc +1 -0
  15. data/test/{rails_app → basepack_test_app}/Gemfile +2 -3
  16. data/test/{rails_app → basepack_test_app}/Gemfile.lock +80 -70
  17. data/test/{rails_app → basepack_test_app}/README +0 -0
  18. data/test/{rails_app → basepack_test_app}/Rakefile +0 -0
  19. data/test/{rails_app → basepack_test_app}/app/components/author_form.rb +0 -0
  20. data/test/{rails_app → basepack_test_app}/app/components/author_grid.rb +0 -0
  21. data/test/{rails_app → basepack_test_app}/app/components/book_form.rb +3 -2
  22. data/test/{rails_app → basepack_test_app}/app/components/book_form_with_custom_fields.rb +0 -0
  23. data/test/basepack_test_app/app/components/book_form_with_defaults.rb +8 -0
  24. data/test/{rails_app → basepack_test_app}/app/components/book_form_with_nested_attributes.rb +0 -0
  25. data/test/{rails_app → basepack_test_app}/app/components/book_grid.rb +0 -0
  26. data/test/{rails_app → basepack_test_app}/app/components/book_grid_loader.rb +0 -0
  27. data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_custom_columns.rb +0 -0
  28. data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_default_values.rb +0 -0
  29. data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_extra_feedback.rb +0 -0
  30. data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_extra_filters.rb +0 -0
  31. data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_nested_attributes.rb +0 -0
  32. data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_paging.rb +0 -0
  33. data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_persistence.rb +0 -0
  34. data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_scoped_authors.rb +0 -0
  35. data/test/{rails_app → basepack_test_app}/app/components/book_grid_with_virtual_attributes.rb +1 -1
  36. data/test/{rails_app → basepack_test_app}/app/components/book_paging_form_panel.rb +0 -0
  37. data/test/{rails_app → basepack_test_app}/app/components/book_query_builder.rb +0 -0
  38. data/test/{rails_app → basepack_test_app}/app/components/book_search_panel.rb +0 -0
  39. data/test/{rails_app → basepack_test_app}/app/components/book_search_panel/javascripts/i18n_de.js +0 -0
  40. data/test/{rails_app → basepack_test_app}/app/components/book_with_custom_primary_key_grid.rb +0 -0
  41. data/test/{rails_app → basepack_test_app}/app/components/books_bound_to_author.rb +0 -0
  42. data/test/{rails_app → basepack_test_app}/app/components/double_book_grid.rb +0 -0
  43. data/test/basepack_test_app/app/components/extras/book_presentation.rb +20 -0
  44. data/test/{rails_app → basepack_test_app}/app/components/form_without_model.rb +0 -0
  45. data/test/{rails_app → basepack_test_app}/app/components/generic_user_form.rb +0 -0
  46. data/test/{rails_app → basepack_test_app}/app/components/lockable_book_form.rb +0 -0
  47. data/test/{rails_app → basepack_test_app}/app/components/lockable_user_form.rb +0 -0
  48. data/test/{rails_app → basepack_test_app}/app/components/paging_form_with_search.rb +0 -0
  49. data/test/{rails_app → basepack_test_app}/app/components/simple_accordion.rb +0 -0
  50. data/test/{rails_app → basepack_test_app}/app/components/simple_panel.rb +0 -0
  51. data/test/{rails_app → basepack_test_app}/app/components/simple_tab_panel.rb +0 -0
  52. data/test/{rails_app → basepack_test_app}/app/components/simple_window.rb +0 -0
  53. data/test/{rails_app → basepack_test_app}/app/components/simple_wrapper.rb +0 -0
  54. data/test/{rails_app → basepack_test_app}/app/components/some_accordion_panel.rb +0 -0
  55. data/test/{rails_app → basepack_test_app}/app/components/some_auth_app.rb +0 -0
  56. data/test/{rails_app → basepack_test_app}/app/components/some_border_layout.rb +0 -0
  57. data/test/{rails_app → basepack_test_app}/app/components/some_simple_app.rb +0 -0
  58. data/test/{rails_app → basepack_test_app}/app/components/some_tab_panel.rb +0 -0
  59. data/test/{rails_app → basepack_test_app}/app/components/user_form.rb +1 -1
  60. data/test/{rails_app → basepack_test_app}/app/components/user_form_with_default_fields.rb +0 -0
  61. data/test/{rails_app → basepack_test_app}/app/components/user_grid.rb +0 -0
  62. data/test/{rails_app → basepack_test_app}/app/components/user_grid_with_customized_form_fields.rb +0 -0
  63. data/test/{rails_app → basepack_test_app}/app/components/window_component_loader.rb +0 -0
  64. data/test/{rails_app → basepack_test_app}/app/controllers/application_controller.rb +0 -0
  65. data/test/basepack_test_app/app/controllers/components_controller.rb +10 -0
  66. data/test/basepack_test_app/app/controllers/welcome_controller.rb +9 -0
  67. data/test/basepack_test_app/app/helpers/application_helper.rb +8 -0
  68. data/test/{rails_app → basepack_test_app}/app/helpers/embedded_components_helper.rb +0 -0
  69. data/test/{rails_app → basepack_test_app}/app/models/address.rb +0 -0
  70. data/test/{rails_app → basepack_test_app}/app/models/author.rb +0 -0
  71. data/test/{rails_app → basepack_test_app}/app/models/book.rb +0 -0
  72. data/test/{rails_app → basepack_test_app}/app/models/book_with_custom_primary_key.rb +0 -0
  73. data/test/{rails_app → basepack_test_app}/app/models/role.rb +0 -0
  74. data/test/{rails_app → basepack_test_app}/app/models/user.rb +0 -0
  75. data/test/{rails_app → basepack_test_app}/app/presenters/forms/generic_user.rb +0 -0
  76. data/test/{rails_app → basepack_test_app}/app/views/components/loadable_window.html.erb +0 -0
  77. data/test/{rails_app → basepack_test_app}/app/views/components/simple_panel.html.erb +0 -0
  78. data/test/basepack_test_app/app/views/layouts/application.html.erb +12 -0
  79. data/test/{rails_app/app/views/layouts/application.html.erb → basepack_test_app/app/views/layouts/components.html.erb} +0 -0
  80. data/test/{rails_app → basepack_test_app}/app/views/layouts/nested.html.erb +0 -0
  81. data/test/basepack_test_app/app/views/welcome/index.html.erb +10 -0
  82. data/test/{rails_app → basepack_test_app}/config.ru +0 -0
  83. data/test/{rails_app → basepack_test_app}/config/application.rb +7 -0
  84. data/test/{rails_app → basepack_test_app}/config/boot.rb +0 -0
  85. data/test/{rails_app → basepack_test_app}/config/cucumber.yml +0 -0
  86. data/test/{rails_app → basepack_test_app}/config/database.yml.sample +0 -0
  87. data/test/{rails_app → basepack_test_app}/config/environment.rb +0 -0
  88. data/test/{rails_app → basepack_test_app}/config/environments/development.rb +1 -1
  89. data/test/{rails_app → basepack_test_app}/config/environments/production.rb +0 -0
  90. data/test/{rails_app → basepack_test_app}/config/environments/test.rb +0 -0
  91. data/test/{rails_app → basepack_test_app}/config/initializers/backtrace_silencers.rb +0 -1
  92. data/test/{rails_app → basepack_test_app}/config/initializers/inflections.rb +0 -0
  93. data/test/{rails_app → basepack_test_app}/config/initializers/mime_types.rb +0 -0
  94. data/test/{rails_app → basepack_test_app}/config/initializers/netzke.rb +1 -1
  95. data/test/{rails_app → basepack_test_app}/config/initializers/secret_token.rb +0 -0
  96. data/test/{rails_app → basepack_test_app}/config/initializers/session_store.rb +1 -1
  97. data/test/{rails_app → basepack_test_app}/config/locales/de.yml +0 -0
  98. data/test/{rails_app → basepack_test_app}/config/locales/es.yml +0 -0
  99. data/test/{rails_app → basepack_test_app}/config/routes.rb +0 -0
  100. data/test/basepack_test_app/db/development_structure.sql +88 -0
  101. data/test/{rails_app → basepack_test_app}/db/migrate/20100914104207_create_users.rb +0 -0
  102. data/test/{rails_app → basepack_test_app}/db/migrate/20100914104236_create_roles.rb +0 -0
  103. data/test/{rails_app → basepack_test_app}/db/migrate/20101026185816_create_authors.rb +0 -0
  104. data/test/{rails_app → basepack_test_app}/db/migrate/20101026190021_create_books.rb +0 -0
  105. data/test/{rails_app → basepack_test_app}/db/migrate/20110101143818_create_addresses.rb +0 -0
  106. data/test/{rails_app → basepack_test_app}/db/migrate/20110213213050_create_netzke_component_states.rb +0 -0
  107. data/test/{rails_app → basepack_test_app}/db/migrate/20110701070052_create_book_with_custom_primary_keys.rb +0 -0
  108. data/test/basepack_test_app/db/migrate/20110901114016_add_last_read_at_to_books.rb +9 -0
  109. data/test/{rails_app → basepack_test_app}/db/schema.rb +4 -2
  110. data/test/{rails_app → basepack_test_app}/db/seeds.rb +0 -0
  111. data/test/{rails_app → basepack_test_app}/features/accordion_panel.feature +0 -0
  112. data/test/{rails_app → basepack_test_app}/features/components_in_view.feature +0 -0
  113. data/test/{rails_app → basepack_test_app}/features/form_panel.feature +15 -0
  114. data/test/{rails_app → basepack_test_app}/features/grid_panel.feature +0 -0
  115. data/test/{rails_app → basepack_test_app}/features/grid_panel_with_custom_primary_key.feature +0 -0
  116. data/test/basepack_test_app/features/grid_sorting.feature +39 -0
  117. data/test/{rails_app → basepack_test_app}/features/i18n.feature +0 -0
  118. data/test/{rails_app → basepack_test_app}/features/nested_attributes.feature +0 -0
  119. data/test/{rails_app → basepack_test_app}/features/paging_form_panel.feature +0 -1
  120. data/test/{rails_app → basepack_test_app}/features/search_in_grid.feature +0 -0
  121. data/test/{rails_app → basepack_test_app}/features/simple_app.feature +0 -0
  122. data/test/{rails_app → basepack_test_app}/features/simple_panel.feature +0 -0
  123. data/test/{rails_app → basepack_test_app}/features/step_definitions/accordion_steps.rb +0 -0
  124. data/test/{rails_app → basepack_test_app}/features/step_definitions/ext_steps.rb +0 -0
  125. data/test/{rails_app → basepack_test_app}/features/step_definitions/form_panel_steps.rb +4 -7
  126. data/test/{rails_app → basepack_test_app}/features/step_definitions/generic_steps.rb +0 -0
  127. data/test/{rails_app → basepack_test_app}/features/step_definitions/grid_panel_steps.rb +28 -5
  128. data/test/{rails_app → basepack_test_app}/features/step_definitions/pickle_steps.rb +0 -0
  129. data/test/{rails_app → basepack_test_app}/features/step_definitions/web_steps.rb +0 -0
  130. data/test/{rails_app → basepack_test_app}/features/support/env.rb +2 -5
  131. data/test/{rails_app → basepack_test_app}/features/support/paths.rb +0 -0
  132. data/test/{rails_app → basepack_test_app}/features/support/pickle.rb +0 -0
  133. data/test/{rails_app → basepack_test_app}/features/support/selectors.rb +0 -0
  134. data/test/{rails_app → basepack_test_app}/features/tab_panel.feature +0 -0
  135. data/test/{rails_app → basepack_test_app}/features/validations_in_grid.feature +0 -0
  136. data/test/{rails_app → basepack_test_app}/features/virtual_attributes.feature +0 -0
  137. data/test/{rails_app → basepack_test_app}/features/window.feature +0 -0
  138. data/test/{rails_app → basepack_test_app}/lib/tasks/.gitkeep +0 -0
  139. data/test/{rails_app → basepack_test_app}/lib/tasks/cucumber.rake +0 -0
  140. data/test/{rails_app → basepack_test_app}/public/404.html +0 -0
  141. data/test/{rails_app → basepack_test_app}/public/422.html +0 -0
  142. data/test/{rails_app → basepack_test_app}/public/500.html +0 -0
  143. data/test/{rails_app → basepack_test_app}/public/favicon.ico +0 -0
  144. data/test/{rails_app → basepack_test_app}/public/images/header-deco.gif +0 -0
  145. data/test/{rails_app → basepack_test_app}/public/images/rails.png +0 -0
  146. data/test/{rails_app → basepack_test_app}/public/javascripts/application.js +0 -0
  147. data/test/{rails_app → basepack_test_app}/public/javascripts/controls.js +0 -0
  148. data/test/{rails_app → basepack_test_app}/public/javascripts/dragdrop.js +0 -0
  149. data/test/{rails_app → basepack_test_app}/public/javascripts/effects.js +0 -0
  150. data/test/{rails_app → basepack_test_app}/public/javascripts/prototype.js +0 -0
  151. data/test/{rails_app → basepack_test_app}/public/javascripts/rails.js +0 -0
  152. data/test/{rails_app → basepack_test_app}/public/robots.txt +0 -0
  153. data/test/{rails_app → basepack_test_app}/public/stylesheets/.gitkeep +0 -0
  154. data/test/{rails_app → basepack_test_app}/script/cucumber +0 -0
  155. data/test/{rails_app → basepack_test_app}/script/rails +0 -0
  156. data/test/{rails_app → basepack_test_app}/spec/active_record/attributes_spec.rb +0 -0
  157. data/test/{rails_app → basepack_test_app}/spec/active_record/relation_extensions_spec.rb +0 -0
  158. data/test/{rails_app → basepack_test_app}/spec/components/form_panel_spec.rb +0 -0
  159. data/test/{rails_app → basepack_test_app}/spec/components/grid_panel_spec.rb +0 -0
  160. data/test/{rails_app → basepack_test_app}/spec/factories.rb +0 -0
  161. data/test/{rails_app → basepack_test_app}/spec/spec_helper.rb +0 -0
  162. data/test/{rails_app → basepack_test_app}/test/performance/browsing_test.rb +0 -0
  163. data/test/{rails_app → basepack_test_app}/test/test_helper.rb +0 -0
  164. data/test/{rails_app → basepack_test_app}/vendor/plugins/.gitkeep +0 -0
  165. metadata +198 -207
  166. data/test/rails_app/app/components/book_presentation.rb +0 -18
  167. data/test/rails_app/app/controllers/components_controller.rb +0 -6
  168. data/test/rails_app/app/controllers/welcome_controller.rb +0 -5
  169. data/test/rails_app/app/helpers/application_helper.rb +0 -2
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.feedback('Suc'+'cess!')}, this);
32
+ this.on('submitsuccess', function(){ this.netzkeFeedback('Suc'+'cess!')}, this);
32
33
  }
33
34
  JS
34
35
 
@@ -0,0 +1,8 @@
1
+ class BookFormWithDefaults < Netzke::Basepack::FormPanel
2
+ def configuration
3
+ super.tap do |c|
4
+ c[:model] = "Book"
5
+ c[:record_id] = Book.first.id
6
+ end
7
+ end
8
+ end
@@ -1,7 +1,7 @@
1
1
  class BookGridWithVirtualAttributes < Netzke::Basepack::GridPanel
2
2
  js_property :title, "Books"
3
3
 
4
- include BookPresentation
4
+ include Extras::BookPresentation
5
5
 
6
6
  def default_config
7
7
  super.merge(
@@ -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
@@ -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,
@@ -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
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Netzke Basepack Test App</title>
5
+ <%= csrf_meta_tag %>
6
+ </head>
7
+ <body>
8
+
9
+ <%= yield %>
10
+
11
+ </body>
12
+ </html>
@@ -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
@@ -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
@@ -5,4 +5,3 @@ Rails.backtrace_cleaner.remove_silencers!
5
5
 
6
6
  # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
7
7
  # Rails.backtrace_cleaner.add_silencer { |line| line =~ /passenger/ }
8
-
@@ -3,7 +3,7 @@ Netzke::Basepack.setup do |config|
3
3
  end
4
4
 
5
5
  Netzke::Core.setup do |config|
6
- config.ext_uri = "/extjs4"
6
+ # config.ext_uri = "/extjs4"
7
7
  # config.ext3_compat_uri = "/extjs-compatibility"
8
8
  config.js_direct_max_retries = 0
9
9
  end
@@ -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 => '_rails_app_session'
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
@@ -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');