forked from flippercloud/flipper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for rails 5.1.4 and default to it
- Loading branch information
1 parent
3498887
commit 0678d35
Showing
10 changed files
with
112 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
require 'pathname' | ||
require 'logger' | ||
|
||
root_path = Pathname(__FILE__).dirname.join('..').expand_path | ||
lib_path = root_path.join('lib') | ||
$:.unshift(lib_path) | ||
|
||
require 'active_record' | ||
ActiveRecord::Base.establish_connection({ | ||
adapter: 'sqlite3', | ||
database: ':memory:', | ||
}) | ||
|
||
ActiveRecord::Base.connection.execute <<-SQL | ||
CREATE TABLE flipper_features ( | ||
id integer PRIMARY KEY, | ||
key text NOT NULL UNIQUE, | ||
created_at datetime NOT NULL, | ||
updated_at datetime NOT NULL | ||
) | ||
SQL | ||
|
||
ActiveRecord::Base.connection.execute <<-SQL | ||
CREATE TABLE flipper_gates ( | ||
id integer PRIMARY KEY, | ||
feature_key text NOT NULL, | ||
key text NOT NULL, | ||
value text DEFAULT NULL, | ||
created_at datetime NOT NULL, | ||
updated_at datetime NOT NULL | ||
) | ||
SQL | ||
|
||
ActiveRecord::Base.connection.execute <<-SQL | ||
CREATE UNIQUE INDEX index_gates_on_keys_and_value on flipper_gates (feature_key, key, value) | ||
SQL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters