databaseformalizer 0.3.0 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@ module Databaseformalizer
6
6
  # GET /entities.json
7
7
  def index
8
8
  @entities = Entity.find(:all, :limit=>100)
9
- EntitiesHelper.setModelGraph("public/images/UMLmodel.png")
9
+ EntitiesHelper.setModelGraph("public/UMLmodel.png")
10
10
 
11
11
  respond_to do |format|
12
12
  format.html # index.html.erb
@@ -4,7 +4,7 @@ module Databaseformalizer
4
4
  # GET /entity_defs.json
5
5
  def index
6
6
  @entity_defs = EntityDef.all
7
- EntityDefsHelper.setMetaModelGraph("public/images/UMLmetaModel.png")
7
+ EntityDefsHelper.setMetaModelGraph("public/UMLmetaModel.png")
8
8
 
9
9
  respond_to do |format|
10
10
  format.html # index.html.erb
@@ -5,7 +5,6 @@ module Databaseformalizer
5
5
  # Create a new graph
6
6
  g = GraphViz.new( :G, :type => :digraph )
7
7
 
8
- # Graph configuration
9
8
  g.node[:color] = "#ddaa66"
10
9
  g.node[:style] = "filled"
11
10
  g.node[:shape] = "box"
@@ -16,14 +15,11 @@ module Databaseformalizer
16
15
  g.node[:fontcolor]= "#000000"
17
16
  g.node[:margin] = "0.05"
18
17
 
19
- # set global edge options
20
18
  g.edge[:color] = "#999999"
21
19
  g.edge[:weight] = "1"
22
20
  g.edge[:fontsize] = "6"
23
21
  g.edge[:fontcolor]= "#444444"
24
22
  g.edge[:fontname] = "Verdana"
25
- #g.edge[:dir] = "forward"
26
- #g.edge[:arrowsize]= "0"
27
23
 
28
24
  nodesMap = {}
29
25
  @links = Array.new
@@ -36,15 +32,24 @@ module Databaseformalizer
36
32
  attrDef.attrDefChilds.each do |child|
37
33
  childs += '+ '+child.label+' : '+child.childEntityDef.entity_def_name+' \n'
38
34
  link = [child.childEntityDef.entity_def_name, attrDef.label+'_enum']
39
- if !@links.include? link
35
+ link2 = [attrDef.label+'_enum',child.childEntityDef.entity_def_name]
36
+ if ( (@links.include?(link) == false) and (@links.include?(link2) == false) )
40
37
  @links.push(link)
41
38
  end
42
39
  end
43
40
  enum = g.add_nodes( attrDef.label+'_enum', "shape" => "record", "label" => '{enumeration('+attrDef.label+')|'+childs+'}' )
44
- g.add_edges(enum,entityDef.entity_def_name, "arrowhead" => "vee" )
41
+ link = [attrDef.label+'_enum',entityDef.entity_def_name]
42
+ link2 = [entityDef.entity_def_name,attrDef.label+'_enum']
43
+ if ( (@links.include?(link) == false) and (@links.include?(link2) == false) )# and @links.include? link )#(!@links.include? link && !@links.include? link2)
44
+ @links.push(link)
45
+ end
45
46
  elsif attrDef.dataType == "entityDef"
46
47
  if attrDef.childEntityDef != nil
47
- @links.push([attrDef.childEntityDef.entity_def_name,entityDef.entity_def_name])
48
+ link = [attrDef.childEntityDef.entity_def_name,entityDef.entity_def_name]
49
+ link2 = [entityDef.entity_def_name,attrDef.childEntityDef.entity_def_name]
50
+ if ( (@links.include?(link) == false) and (@links.include?(link2) == false) )
51
+ @links.push([attrDef.childEntityDef.entity_def_name,entityDef.entity_def_name])
52
+ end
48
53
  attrs += '+ '+attrDef.label+' : '+attrDef.childEntityDef.label+'\l'
49
54
  else
50
55
  attrs += '+ '+attrDef.label+' : null\l'
@@ -57,9 +62,8 @@ module Databaseformalizer
57
62
  end
58
63
 
59
64
  @links.each do |link|
60
- edge = g.add_edges( link[0], link[1], "arrowhead" => "vee" )
61
-
62
-
65
+ edge = g.add_edges( link[0], link[1], "arrowhead" => "none" )
66
+
63
67
  end
64
68
  # Generate output image
65
69
  g.output( :png => uri )
@@ -2,7 +2,7 @@ module Databaseformalizer
2
2
  class AttrDef < ActiveRecord::Base
3
3
  set_table_name "databaseformalizer_attr_defs"
4
4
  set_primary_key :attr_def_name
5
- attr_accessible :attr_def_name, :label, :description, :mandatory, :category, :dataType, :attrDefChild_ids
5
+ attr_accessible :attr_def_name, :label, :description, :mandatory, :category, :dataType, :attrDefChild_ids, :child_entity_def_name
6
6
 
7
7
  #Getting Entity
8
8
  has_many :entityDefs, :through => :entityDefAttrDefs
@@ -1,6 +1,7 @@
1
1
  module Databaseformalizer
2
2
  class AttrVal < ActiveRecord::Base
3
3
  set_table_name "databaseformalizer_attr_vals"
4
+ attr_accessible :attrDef
4
5
  belongs_to :attrDef, :foreign_key => "attr_def_name", :class_name => "AttrDef"
5
6
 
6
7
  has_many :attrValsEntities, :class_name => "AttrValsEntity"#, :source => :attr_val
@@ -1,7 +1,7 @@
1
1
  module Databaseformalizer
2
2
  class Entity < ActiveRecord::Base
3
3
  set_table_name "databaseformalizer_entities"
4
-
4
+ attr_accessible :label, :description, :entity_def_id
5
5
  belongs_to :entity_def
6
6
 
7
7
  has_many :attr_vals, :through => :attr_vals_entities
@@ -6,6 +6,7 @@ module Databaseformalizer
6
6
 
7
7
  has_many :attrDefs, :through => :entityDefAttrDefs
8
8
  has_many :entityDefAttrDefs, :foreign_key => "entity_def_name", :dependent => :delete_all
9
+ #dele_all just for the liaison table
9
10
 
10
11
  has_many :entities, :dependent => :delete_all
11
12
  #has_many :childAttrDefs, :foreign_key => "child_entity_def_name"
@@ -36,8 +36,8 @@
36
36
  <div class="page-header">
37
37
  <ul class="thumbnails">
38
38
  <li class="span10">
39
- <a href="/images/UMLmodel.png" class="thumbnail">
40
- <img src="/images/UMLmodel.png" alt="">
39
+ <a href="/UMLmodel.png" class="thumbnail">
40
+ <img src="/UMLmodel.png" alt="">
41
41
  </a>
42
42
  </li>
43
43
  </ul>
@@ -29,7 +29,6 @@
29
29
  </div>
30
30
  <div class="clearfix">
31
31
  <label>Choix des attributs: </label>
32
- <%= hidden_field_tag 'entity_def[attrDef_ids][]' %>
33
32
  <div class="input">
34
33
  <ul class="inputs-list">
35
34
  <% Databaseformalizer::AttrDef.all.each do |attrdef| %>
@@ -47,8 +47,8 @@
47
47
  <div class="page-header">
48
48
  <ul class="thumbnails">
49
49
  <li class="span10">
50
- <a href="/images/UMLmetaModel.png" class="thumbnail">
51
- <img src="/images/UMLmetaModel.png" alt="">
50
+ <a href="/UMLmetaModel.png" class="thumbnail">
51
+ <img src="/UMLmetaModel.png" alt="">
52
52
  </a>
53
53
  </li>
54
54
  </ul>
@@ -54,30 +54,21 @@
54
54
 
55
55
 
56
56
  <ul class="nav pull-right">
57
-
58
- <%= render :partial => "elise/account/header_menu" %>
59
-
60
- <% if current_user.can_see("databaseformalizer")%>
61
- <li class="dropdown">
62
- <div class="btn-group">
63
- <a class="btn dropdown-toggle btn-success" data-toggle="dropdown" href="#">
64
- <i class="icon-wrench"></i>Administration
65
- <span class="caret"></span>
66
- </a>
67
-
68
- <ul class="dropdown-menu">
69
- <li><%= link_to "Users", users_path %></li>
70
- <li><%= link_to "Access rights", elise_features_path %></li>
71
- <li><%= link_to "Roles", roles_path %></li>
72
- <li class="divider"></li>
73
- <p class="nav-header">Databaseformalizer</p>
74
- <li><%= link_to "entity def", databaseformalizer_entity_defs_path %></li>
75
- <li><%= link_to "attributs def", databaseformalizer_attr_defs_path %></li>
76
- <li><%= link_to "entities", databaseformalizer_entities_path %></li>
77
- </ul>
78
- </div>
79
- </li>
80
- <%end%>
57
+ <li class="dropdown">
58
+ <div class="btn-group">
59
+ <a class="btn dropdown-toggle btn-success" data-toggle="dropdown" href="#">
60
+ <i class="icon-wrench"></i>Administration
61
+ <span class="caret"></span>
62
+ </a>
63
+
64
+ <ul class="dropdown-menu">
65
+ <p class="nav-header">Databaseformalizer</p>
66
+ <li><%= link_to "entity def", databaseformalizer_entity_defs_path %></li>
67
+ <li><%= link_to "attributs def", databaseformalizer_attr_defs_path %></li>
68
+ <li><%= link_to "entities", databaseformalizer_entities_path %></li>
69
+ </ul>
70
+ </div>
71
+ </li>
81
72
  </ul>
82
73
  </div>
83
74
  <%= render :partial => "shared/navigation" %>
@@ -0,0 +1,22 @@
1
+ <%
2
+ @pageTitle = "All Requests" if @pageTitle.nil?
3
+ @navigation_currentPageName = @pageTitle if @navigation_currentPageName.nil?
4
+ @navigation_links = Hash.new if @navigation_links.nil?
5
+ @navigation_additionalLinks = Hash.new if @navigation_additionalLinks.nil?
6
+
7
+ #The best practice to manage this breadcrum is to define in a controller the method :createBreadcrumbsInfo
8
+ #And set it as a before_filter for all mathode which show a display
9
+ #Please take exemple in release_controller.rb and application.rb
10
+
11
+ %>
12
+ <table class="breadcrumb" style="width: 100%;" cellpadding="5px">
13
+ <tr>
14
+ <td>
15
+ <%= link_to(raw("<i class='icon-home'></i>"), "/databaseformalizer" )%> <span class="divider">/</span>
16
+ <%= link_to controller_name.capitalize, :controller=> controller_name %>
17
+ <span class="divider">/</span>
18
+ <%= action_name.capitalize %>
19
+ </td>
20
+ </tr>
21
+ </table>
22
+
@@ -5,13 +5,14 @@
5
5
  $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{databaseformalizer}
8
- s.version = "0.3.0"
8
+ s.version = "1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Christophe Desclaux"]
12
12
  s.date = %q{2012-05-01}
13
13
  s.email = %q{descl@zouig.org}
14
-
14
+ s.homepage = "https://github.com/descl/databaseformalizer"
15
+
15
16
  s.files = `git ls-files`.split("\n")
16
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
18
  s.require_paths = ["lib"]
@@ -20,7 +21,7 @@ Gem::Specification.new do |s|
20
21
  s.summary = %q{a gem for generating databases interaction controllers}
21
22
 
22
23
  s.add_dependency('ruby-graphviz', '~> 1.0.5')
23
- s.add_dependency('jquery-rails', "~> 1.0.19")
24
+ s.add_dependency('jquery-rails')
24
25
 
25
26
  if s.respond_to? :specification_version then
26
27
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -54,7 +54,7 @@ class <%= plural_name.camelize %>Controller < ApplicationController
54
54
  )
55
55
  Databaseformalizer::EntityDef.find("<%= class_name %>").attrDefs.each do |attr|
56
56
  if params[:attr_vals][attr.label] != nil
57
- @planned_event.update_attribute(attr.label, params[:attr_vals][attr.label])
57
+ @<%= singular_name %>.update_attribute(attr.label, params[:attr_vals][attr.label])
58
58
  end
59
59
  end
60
60
  respond_to do |format|
@@ -20,33 +20,25 @@ class DatabaseformalizerGenerator < Rails::Generators::Base
20
20
  # Every method that is declared below will be automatically executed when the generator is run
21
21
 
22
22
  def create_migration_file
23
- f = File.open File.join(File.dirname(__FILE__), 'templates', 'schema.rb')
24
- schema = f.read; f.close
25
-
26
- schema.gsub!(/ActiveRecord::Schema.*\n/, '')
27
- schema.gsub!(/^end\n*$/, '')
28
-
29
- f = File.open File.join(File.dirname(__FILE__), 'templates', 'migration.rb')
30
- migration = f.read; f.close
31
- migration.gsub!(/SCHEMA_AUTO_INSERTED_HERE/, schema)
32
-
33
- tmp = File.open "tmp/~migration_ready.rb", "w"
34
- tmp.write migration
35
- tmp.close
36
-
37
- migration_template '../../../tmp/~migration_ready.rb',
23
+ migration_template 'migration.rb',
38
24
  'db/migrate/create_databaseformalizer_tables.rb'
39
- remove_file 'tmp/~migration_ready.rb'
40
25
  end
41
26
 
42
27
  def copy_initializer_file
43
28
  copy_file 'initializer.rb', 'config/initializers/databaseformalizer.rb'
44
29
  end
45
30
 
46
- def update_application_template
47
- f = File.open "app/views/layouts/application.html.erb"
48
- layout = f.read; f.close
49
-
31
+ def add_databaseformalizer_routes
32
+ dbfo_route = "mount_at = '/databaseformalizer'
33
+ with_options(:path_prefix => mount_at, :name_prefix => 'databaseformalizer_') do |t|
34
+ t.resources :entities, :controller => 'databaseformalizer/entities'
35
+ t.resources :entity_defs, :controller => 'databaseformalizer/entity_defs'
36
+ t.resources :attr_defs, :controller => 'databaseformalizer/attr_defs'
37
+ end
38
+
39
+ match 'databaseformalizer',# :to => 'databaseformalizer/dbformahome#index'
40
+ :action => 'index',
41
+ :controller => 'databaseformalizer/dbformahome'"
42
+ route dbfo_route
50
43
  end
51
-
52
44
  end
@@ -1,6 +1,88 @@
1
1
  class CreateDatabaseformalizerTables < ActiveRecord::Migration
2
2
  def self.up
3
- SCHEMA_AUTO_INSERTED_HERE
3
+
4
+ # create_table :databaseformalizer_widgets, :force => true do |t|
5
+ # t.string :title
6
+ # t.datetime :created_at
7
+ # t.datetime :updated_at
8
+ # end
9
+ #
10
+ # add_index :databaseformalizer_widgets, [:title]
11
+
12
+
13
+ create_table :databaseformalizer_attr_defs, :id => false, :force => true do |t|
14
+ t.string "attr_def_name"
15
+ t.string "label"
16
+ t.string "description"
17
+ t.boolean "mandatory"
18
+ t.string "category"
19
+ t.string "dataType"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
22
+ t.string "child_entity_def_name"
23
+ end
24
+ add_index :databaseformalizer_attr_defs, ["attr_def_name"], :name => "index_attr_defs_on_attr_def_name", :unique => true
25
+
26
+ create_table :databaseformalizer_attr_list_join_defs, :id => false, :force => true do |t|
27
+ t.string "parent_name", :null => false
28
+ t.string "child_name", :null => false
29
+ t.datetime "created_at", :null => false
30
+ t.datetime "updated_at", :null => false
31
+ end
32
+ add_index :databaseformalizer_attr_list_join_defs, ["parent_name", "child_name"], :name => "index_attr_list_join_defs_on_parent_name_and_child_name", :unique => true
33
+
34
+ create_table :databaseformalizer_attr_list_join_vals, :force => true do |t|
35
+ t.integer "parent_name_id"
36
+ t.integer "child_name_id"
37
+ t.datetime "created_at", :null => false
38
+ t.datetime "updated_at", :null => false
39
+ end
40
+ add_index :databaseformalizer_attr_list_join_vals, ["child_name_id"], :name => "index_attr_list_join_vals_on_child_name_id"
41
+ add_index :databaseformalizer_attr_list_join_vals, ["parent_name_id"], :name => "index_attr_list_join_vals_on_parent_name_id"
42
+
43
+ create_table :databaseformalizer_attr_vals, :force => true do |t|
44
+ t.string "value"
45
+ t.string "attr_def_name"
46
+ t.datetime "created_at", :null => false
47
+ t.datetime "updated_at", :null => false
48
+ end
49
+
50
+ create_table :databaseformalizer_attr_vals_entities, :id => false, :force => true do |t|
51
+ t.integer "entity_id"
52
+ t.integer "attr_val_id"
53
+ t.datetime "created_at", :null => false
54
+ t.datetime "updated_at", :null => false
55
+ end
56
+ add_index :databaseformalizer_attr_vals_entities, ["entity_id", "attr_val_id"], :name => "index_attr_vals_entities_on_entity_id_and_attr_val_id"
57
+
58
+ create_table :databaseformalizer_entities, :force => true do |t|
59
+ t.string "label"
60
+ t.string "description"
61
+ t.string "entity_def_id"
62
+ t.datetime "created_at", :null => false
63
+ t.datetime "updated_at", :null => false
64
+ end
65
+ add_index :databaseformalizer_entities, ["entity_def_id"], :name => "index_entities_on_entity_def_id"
66
+
67
+ create_table :databaseformalizer_entity_def_attr_defs, :force => true do |t|
68
+ t.string "entity_def_name"
69
+ t.string "attr_def_name"
70
+ t.datetime "created_at", :null => false
71
+ t.datetime "updated_at", :null => false
72
+ end
73
+ add_index :databaseformalizer_entity_def_attr_defs, ["attr_def_name"], :name => "index_entity_def_attr_defs_on_attr_def_name"
74
+ add_index :databaseformalizer_entity_def_attr_defs, ["entity_def_name"], :name => "index_entity_def_attr_defs_on_entity_def_name"
75
+
76
+ create_table :databaseformalizer_entity_defs, :id => false, :force => true do |t|
77
+ t.string "entity_def_name", :null => false
78
+ t.string "label"
79
+ t.string "description"
80
+ t.datetime "created_at", :null => false
81
+ t.datetime "updated_at", :null => false
82
+ end
83
+ add_index :databaseformalizer_entity_defs, ["entity_def_name"], :name => "index_entity_defs_on_entity_def_name", :unique => true
84
+
85
+
4
86
  end
5
87
 
6
88
  def self.down
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: databaseformalizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: '1.0'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-01 00:00:00.000000000Z
12
+ date: 2012-05-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-graphviz
16
- requirement: &10194468 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,18 +21,28 @@ dependencies:
21
21
  version: 1.0.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *10194468
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 1.0.5
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: jquery-rails
27
- requirement: &10194192 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
- - - ~>
35
+ - - ! '>='
31
36
  - !ruby/object:Gem::Version
32
- version: 1.0.19
37
+ version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *10194192
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  description:
37
47
  email: descl@zouig.org
38
48
  executables: []
@@ -98,6 +108,7 @@ files:
98
108
  - app/views/databaseformalizer/entity_defs/new.html.erb
99
109
  - app/views/databaseformalizer/entity_defs/show.html.erb
100
110
  - app/views/databaseformalizer/layouts/application.html.erb
111
+ - app/views/shared/_navigation.html.erb
101
112
  - databaseformalizer.gemspec
102
113
  - lib/acts_as_entity/base.rb
103
114
  - lib/application_controller.rb
@@ -117,8 +128,6 @@ files:
117
128
  - lib/rails/generators/databaseformalizer/databaseformalizer_generator.rb
118
129
  - lib/rails/generators/databaseformalizer/templates/initializer.rb
119
130
  - lib/rails/generators/databaseformalizer/templates/migration.rb
120
- - lib/rails/generators/databaseformalizer/templates/migration.rb.bak
121
- - lib/rails/generators/databaseformalizer/templates/schema.rb
122
131
  - lib/rails/railties/tasks.rake
123
132
  - public/bootstrap/css/bootstrap-fixed-header.css
124
133
  - public/bootstrap/css/bootstrap-responsive.css
@@ -139,7 +148,6 @@ files:
139
148
  - public/bootstrap/js/bootstrap-transition.js
140
149
  - public/bootstrap/js/bootstrap.js
141
150
  - public/bootstrap/js/bootstrap.min.js
142
- - public/images/Thumbs.db
143
151
  - public/images/bootstrap/Thumbs.db
144
152
  - public/images/bootstrap/glyphicons-halflings.png
145
153
  - public/images/databaseformalizer.jpg
@@ -305,7 +313,7 @@ files:
305
313
  - test/database.yml
306
314
  - test/test_helper.rb
307
315
  - test/unit/databaseformalizer_test.rb
308
- homepage:
316
+ homepage: https://github.com/descl/databaseformalizer
309
317
  licenses: []
310
318
  post_install_message:
311
319
  rdoc_options: []
@@ -325,7 +333,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
325
333
  version: '0'
326
334
  requirements: []
327
335
  rubyforge_project:
328
- rubygems_version: 1.7.2
336
+ rubygems_version: 1.8.24
329
337
  signing_key:
330
338
  specification_version: 3
331
339
  summary: a gem for generating databases interaction controllers
@@ -1,9 +0,0 @@
1
- class CreateDatabaseformalizerTables < ActiveRecord::Migration
2
- def self.up
3
- SCHEMA_AUTO_INSERTED_HERE
4
- end
5
-
6
- def self.down
7
- drop_table :databaseformalizer_widgets
8
- end
9
- end
@@ -1,84 +0,0 @@
1
- ActiveRecord::Schema.define(:version => 0) do
2
-
3
- # create_table :databaseformalizer_widgets, :force => true do |t|
4
- # t.string :title
5
- # t.datetime :created_at
6
- # t.datetime :updated_at
7
- # end
8
- #
9
- # add_index :databaseformalizer_widgets, [:title]
10
-
11
-
12
- create_table :databaseformalizer_attr_defs, :id => false, :force => true do |t|
13
- t.string "attr_def_name"
14
- t.string "label"
15
- t.string "description"
16
- t.boolean "mandatory"
17
- t.string "category"
18
- t.string "dataType"
19
- t.datetime "created_at", :null => false
20
- t.datetime "updated_at", :null => false
21
- t.string "child_entity_def_name"
22
- end
23
- add_index :databaseformalizer_attr_defs, ["attr_def_name"], :name => "index_attr_defs_on_attr_def_name", :unique => true
24
-
25
- create_table :databaseformalizer_attr_list_join_defs, :id => false, :force => true do |t|
26
- t.string "parent_name", :null => false
27
- t.string "child_name", :null => false
28
- t.datetime "created_at", :null => false
29
- t.datetime "updated_at", :null => false
30
- end
31
- add_index :databaseformalizer_attr_list_join_defs, ["parent_name", "child_name"], :name => "index_attr_list_join_defs_on_parent_name_and_child_name", :unique => true
32
-
33
- create_table :databaseformalizer_attr_list_join_vals, :force => true do |t|
34
- t.integer "parent_name_id"
35
- t.integer "child_name_id"
36
- t.datetime "created_at", :null => false
37
- t.datetime "updated_at", :null => false
38
- end
39
- add_index :databaseformalizer_attr_list_join_vals, ["child_name_id"], :name => "index_attr_list_join_vals_on_child_name_id"
40
- add_index :databaseformalizer_attr_list_join_vals, ["parent_name_id"], :name => "index_attr_list_join_vals_on_parent_name_id"
41
-
42
- create_table :databaseformalizer_attr_vals, :force => true do |t|
43
- t.string "value"
44
- t.string "attr_def_name"
45
- t.datetime "created_at", :null => false
46
- t.datetime "updated_at", :null => false
47
- end
48
-
49
- create_table :databaseformalizer_attr_vals_entities, :id => false, :force => true do |t|
50
- t.integer "entity_id"
51
- t.integer "attr_val_id"
52
- t.datetime "created_at", :null => false
53
- t.datetime "updated_at", :null => false
54
- end
55
- add_index :databaseformalizer_attr_vals_entities, ["entity_id", "attr_val_id"], :name => "index_attr_vals_entities_on_entity_id_and_attr_val_id"
56
-
57
- create_table :databaseformalizer_entities, :force => true do |t|
58
- t.string "label"
59
- t.string "description"
60
- t.string "entity_def_id"
61
- t.datetime "created_at", :null => false
62
- t.datetime "updated_at", :null => false
63
- end
64
- add_index :databaseformalizer_entities, ["entity_def_id"], :name => "index_entities_on_entity_def_id"
65
-
66
- create_table :databaseformalizer_entity_def_attr_defs, :force => true do |t|
67
- t.string "entity_def_name"
68
- t.string "attr_def_name"
69
- t.datetime "created_at", :null => false
70
- t.datetime "updated_at", :null => false
71
- end
72
- add_index :databaseformalizer_entity_def_attr_defs, ["attr_def_name"], :name => "index_entity_def_attr_defs_on_attr_def_name"
73
- add_index :databaseformalizer_entity_def_attr_defs, ["entity_def_name"], :name => "index_entity_def_attr_defs_on_entity_def_name"
74
-
75
- create_table :databaseformalizer_entity_defs, :id => false, :force => true do |t|
76
- t.string "entity_def_name", :null => false
77
- t.string "label"
78
- t.string "description"
79
- t.datetime "created_at", :null => false
80
- t.datetime "updated_at", :null => false
81
- end
82
- add_index :databaseformalizer_entity_defs, ["entity_def_name"], :name => "index_entity_defs_on_entity_def_name", :unique => true
83
-
84
- end
Binary file