summaryrefslogtreecommitdiff
path: root/vendor/plugins/thinking-sphinx/spec/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/plugins/thinking-sphinx/spec/fixtures')
-rw-r--r--vendor/plugins/thinking-sphinx/spec/fixtures/data.sql32
-rw-r--r--vendor/plugins/thinking-sphinx/spec/fixtures/database.yml.default3
-rw-r--r--vendor/plugins/thinking-sphinx/spec/fixtures/models.rb94
-rw-r--r--vendor/plugins/thinking-sphinx/spec/fixtures/structure.sql95
4 files changed, 0 insertions, 224 deletions
diff --git a/vendor/plugins/thinking-sphinx/spec/fixtures/data.sql b/vendor/plugins/thinking-sphinx/spec/fixtures/data.sql
deleted file mode 100644
index d5ec579..0000000
--- a/vendor/plugins/thinking-sphinx/spec/fixtures/data.sql
+++ /dev/null
@@ -1,32 +0,0 @@
1insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('female','Ellie','K','Ford','38 Mills Street','Eagle Farm Bc','QLD','4009','Ellie.K.Ford@mailinator.com','1970/1/23 00:00:00', 3, 'CricketTeam');
2insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('female','Aaliyah','E','Allen','71 Murphy Street','Wyola West','WA','6407','Aaliyah.E.Allen@dodgit.com','1980/3/23 00:00:00', 3, 'CricketTeam');
3insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('male','Callum','C','Miah','89 Dalgarno Street','Bullawa Creek','NSW','2390','Callum.C.Miah@trashymail.com','1973/3/25 00:00:00', 3, 'CricketTeam');
4insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('male','Finley','L','Buckley','18 Queen Street','Manly Vale','NSW','2093','Finley.L.Buckley@spambob.com','1962/11/20 00:00:00', 3, 'CricketTeam');
5insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('female','Poppy','A','Hilton','36 Nerrigundah Drive','Nyora','VIC','3987','Poppy.A.Hilton@dodgit.com','1972/10/30 00:00:00', 3, 'CricketTeam');
6insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('female','Eloise','Z','Kennedy','18 Mt Berryman Road','Lilydale','QLD','4344','Eloise.Z.Kennedy@spambob.com','1973/9/28 00:00:00', 3, 'CricketTeam');
7insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('female','Shannon','L','Manning','60 Ocean Pde','Greenvale','QLD','4816','Shannon.L.Manning@dodgit.com','1956/6/13 00:00:00', 3, 'CricketTeam');
8insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('male','Oscar','C','Lawson','43 Feather Street','Battery Hill','QLD','4551','Oscar.C.Lawson@spambob.com','1979/10/17 00:00:00', 3, 'CricketTeam');
9insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('female','Sofia','K','Bray','26 Clifton Street','Pental Island','VIC','3586','Sofia.K.Bray@mailinator.com','1970/5/10 00:00:00', 3, 'CricketTeam');
10insert into `people` (gender, first_name, middle_initial, last_name, street_address, city, state, postcode, email, birthday, team_id, team_type) values('male','Andrew','N','Byrne','35 Cecil Street','Monash Park','NSW','2111','Andrew.N.Byrne@spambob.com','1983/2/16 00:00:00', 3, 'CricketTeam');
11
12insert into `alphas` (name) values ('one');
13insert into `alphas` (name) values ('two');
14insert into `alphas` (name) values ('three');
15insert into `alphas` (name) values ('four');
16insert into `alphas` (name) values ('five');
17insert into `alphas` (name) values ('six');
18insert into `alphas` (name) values ('seven');
19insert into `alphas` (name) values ('eight');
20insert into `alphas` (name) values ('nine');
21insert into `alphas` (name) values ('ten');
22
23insert into `betas` (name) values ('one');
24insert into `betas` (name) values ('two');
25insert into `betas` (name) values ('three');
26insert into `betas` (name) values ('four');
27insert into `betas` (name) values ('five');
28insert into `betas` (name) values ('six');
29insert into `betas` (name) values ('seven');
30insert into `betas` (name) values ('eight');
31insert into `betas` (name) values ('nine');
32insert into `betas` (name) values ('ten');
diff --git a/vendor/plugins/thinking-sphinx/spec/fixtures/database.yml.default b/vendor/plugins/thinking-sphinx/spec/fixtures/database.yml.default
deleted file mode 100644
index dfad2a6..0000000
--- a/vendor/plugins/thinking-sphinx/spec/fixtures/database.yml.default
+++ /dev/null
@@ -1,3 +0,0 @@
1username: root
2password:
3host: localhost \ No newline at end of file
diff --git a/vendor/plugins/thinking-sphinx/spec/fixtures/models.rb b/vendor/plugins/thinking-sphinx/spec/fixtures/models.rb
deleted file mode 100644
index 0e62906..0000000
--- a/vendor/plugins/thinking-sphinx/spec/fixtures/models.rb
+++ /dev/null
@@ -1,94 +0,0 @@
1class Person < ActiveRecord::Base
2 belongs_to :team, :polymorphic => :true
3 has_many :contacts
4
5 has_many :friendships
6 has_many :friends, :through => :friendships
7
8 has_many :tags
9
10 has_many :football_teams, :through => :tags
11
12 define_index do
13 indexes [first_name, middle_initial, last_name], :as => :name
14 indexes team.name, :as => :team_name
15 indexes contacts.phone_number, :as => :phone_numbers
16 indexes city, :prefixes => true
17 indexes state, :infixes => true
18
19 has [first_name, middle_initial, last_name], :as => :name_sort
20 has team.name, :as => :team_name_sort
21
22 has [:id, :team_id], :as => :ids
23 has team(:id), :as => :team_id
24
25 has contacts.phone_number, :as => :phone_number_sort
26 has contacts(:id), :as => :contact_ids
27
28 has birthday
29
30 has friendships.person_id, :as => :friendly_ids
31
32 set_property :delta => true
33 end
34end
35
36class Parent < Person
37end
38
39class Child < Person
40 belongs_to :parent
41 define_index do
42 indexes [parent.first_name, parent.middle_initial, parent.last_name], :as => :parent_name
43 end
44end
45
46class Contact < ActiveRecord::Base
47 belongs_to :person
48end
49
50class Tag < ActiveRecord::Base
51 belongs_to :person
52 belongs_to :football_team
53 belongs_to :cricket_team
54end
55
56class FootballTeam < ActiveRecord::Base
57 has_many :tags
58end
59
60class CricketTeam < ActiveRecord::Base
61 define_index do
62 indexes :name
63 has "SELECT cricket_team_id, id FROM tags", :source => :query, :as => :tags
64 end
65end
66
67class Friendship < ActiveRecord::Base
68 belongs_to :person
69 belongs_to :friend, :class_name => "Person", :foreign_key => :friend_id
70
71 define_index do
72 has person_id, friend_id
73 end
74end
75
76class Alpha < ActiveRecord::Base
77 define_index do
78 indexes :name, :sortable => true
79
80 set_property :field_weights => {"name" => 10}
81 end
82end
83
84class Beta < ActiveRecord::Base
85 define_index do
86 indexes :name, :sortable => true
87
88 set_property :delta => true
89 end
90end
91
92class Search < ActiveRecord::Base
93 #
94end \ No newline at end of file
diff --git a/vendor/plugins/thinking-sphinx/spec/fixtures/structure.sql b/vendor/plugins/thinking-sphinx/spec/fixtures/structure.sql
deleted file mode 100644
index 4ab390d..0000000
--- a/vendor/plugins/thinking-sphinx/spec/fixtures/structure.sql
+++ /dev/null
@@ -1,95 +0,0 @@
1DROP TABLE IF EXISTS `people`;
2
3CREATE TABLE `people` (
4 `id` int(11) NOT NULL auto_increment,
5 `first_name` varchar(50) NULL,
6 `middle_initial` varchar(10) NULL,
7 `last_name` varchar(50) NULL,
8 `gender` varchar(10) NULL,
9 `street_address` varchar(200) NULL,
10 `city` varchar(100) NULL,
11 `state` varchar(100) NULL,
12 `postcode` varchar(10) NULL,
13 `email` varchar(100) NULL,
14 `birthday` datetime NULL,
15 `team_id` int(11) NULL,
16 `team_type` varchar(50) NULL,
17 `type` varchar(50) NULL,
18 `parent_id` varchar(50) NULL,
19 `delta` tinyint(1) NOT NULL DEFAULT 0,
20 PRIMARY KEY (`id`)
21) ENGINE=InnoDB DEFAULT CHARSET=utf8;
22
23DROP TABLE IF EXISTS `friendships`;
24
25CREATE TABLE `friendships` (
26 `id` int(11) NOT NULL auto_increment,
27 `person_id` int(11) NOT NULL,
28 `friend_id` int(11) NOT NULL,
29 `created_at` datetime NOT NULL,
30 `updated_at` datetime NOT NULL,
31 PRIMARY KEY (`id`)
32) ENGINE=InnoDB DEFAULT CHARSET=utf8;
33
34DROP TABLE IF EXISTS `football_teams`;
35
36CREATE TABLE `football_teams` (
37 `id` int(11) NOT NULL auto_increment,
38 `name` varchar(50) NOT NULL,
39 `state` varchar(50) NOT NULL,
40 PRIMARY KEY (`id`)
41) ENGINE=InnoDB DEFAULT CHARSET=utf8;
42
43DROP TABLE IF EXISTS `cricket_teams`;
44
45CREATE TABLE `cricket_teams` (
46 `id` int(11) NOT NULL auto_increment,
47 `name` varchar(50) NOT NULL,
48 `state` varchar(50) NOT NULL,
49 PRIMARY KEY (`id`)
50) ENGINE=InnoDB DEFAULT CHARSET=utf8;
51
52DROP TABLE IF EXISTS `contacts`;
53
54CREATE TABLE `contacts` (
55 `id` int(11) NOT NULL auto_increment,
56 `phone_number` varchar(50) NOT NULL,
57 `person_id` int(11) NOT NULL,
58 PRIMARY KEY (`id`)
59) ENGINE=InnoDB DEFAULT CHARSET=utf8;
60
61DROP TABLE IF EXISTS `alphas`;
62
63CREATE TABLE `alphas` (
64 `id` int(11) NOT NULL auto_increment,
65 `name` varchar(50) NOT NULL,
66 PRIMARY KEY (`id`)
67) ENGINE=InnoDB DEFAULT CHARSET=utf8;
68
69DROP TABLE IF EXISTS `betas`;
70
71CREATE TABLE `betas` (
72 `id` int(11) NOT NULL auto_increment,
73 `name` varchar(50) NOT NULL,
74 `delta` tinyint(1) NOT NULL DEFAULT 0,
75 PRIMARY KEY (`id`)
76) ENGINE=InnoDB DEFAULT CHARSET=utf8;
77
78DROP TABLE IF EXISTS `searches`;
79
80CREATE TABLE `searches` (
81 `id` int(11) NOT NULL auto_increment,
82 `name` varchar(50) NOT NULL,
83 PRIMARY KEY (`id`)
84) ENGINE=InnoDB DEFAULT CHARSET=utf8;
85
86DROP TABLE IF EXISTS `tags`;
87
88CREATE TABLE `tags` (
89 `id` int(11) NOT NULL auto_increment,
90 `person_id` int(11) NOT NULL,
91 `football_team_id` int(11) NOT NULL,
92 `cricket_team_id` int(11) NOT NULL,
93 `name` varchar(50) NOT NULL,
94 PRIMARY KEY (`id`)
95) ENGINE=InnoDB DEFAULT CHARSET=utf8;