earaujoassis / sequel-seed Goto Github PK
View Code? Open in Web Editor NEWA Sequel extension to make seeds/fixtures manageable like migrations
Home Page: https://earaujoassis.github.io/sequel-seed/
License: MIT License
A Sequel extension to make seeds/fixtures manageable like migrations
Home Page: https://earaujoassis.github.io/sequel-seed/
License: MIT License
Looks like a minor paste mishap.
NameError: undefined local variable or method `seed_hash_environment' for #<#<Class:0x56aaaecd>:0x5e01a982>
apply_seed_hash at /Users/olle/.rvm/gems/jruby-1.7.23/gems/sequel-seed-0.3.1/lib/sequel/extensions/seed.rb:128
apply_seed_descriptor at /Users/olle/.rvm/gems/jruby-1.7.23/gems/sequel-seed-0.3.1/lib/sequel/extensions/seed.rb:115
each at org/jruby/RubyArray.java:1613
Hi!
Sequel::Seeder
doesn't support target version?
For example, Sequel::Migrator
:
Sequel::Migrator.run(
DB,
migrations_dir,
target: args[:version].to_i
)
Hello! First off, thanks for putting this together. Very cool.
I am working on a brand new rails 6 rc2 api and I have replaced ActiveRecord with Sequel. For this first project I am trying to not use any models. For example, this is what I have in a seed:
def run
plan_id = IdUtils.new_id
db = DatabaseUtils.db_connection
db[:plans].insert(id: plan_id, name: 'testing')
end
I am wondering if I have access to the database within your framework, vs going out to my db utils module.
Thanks again!
NotificationTemplate.create
"supported_devices": [1,2,3] ;
end# notification do
it is showing this error
rake aborted!
Sequel::DatabaseError: PG::DatatypeMismatch: ERROR: column "supported_devices" is of type text[] but expression is of type record
LINE 1: ..._id}', true, 'am_new_owner_lead_email', NULL, '', (1, 2, 3),...
HINT: You will need to rewrite or cast the expression.
then i have replace [1,2,3] with
Sequel.pg_array([1,2,3],:text)
error
rake aborted!
Sequel::DatabaseError: PG::InvalidTextRepresentation: ERROR: malformed array literal: "[1, 2, 3]"
LINE 1: ..._id}', true, 'am_new_owner_lead_email', NULL, '', '[1, 2, 3]...
DETAIL: Missing "]" after array dimensions.
my model class is
require 'sequel'
require 'pg'
require 'sequel/extensions/seed'
Sequel.extension :seed
DB = Sequel.connect(ENV['DATABASE_URL'])
DB.extension :pg_array
class NotificationTemplate < Sequel::Model
dataset = DB[:notification_templates]
end
i am trying to run using rake db:migrate
If the class specified in a YAML seed is autoloaded (but not yet loaded), Sequel::Seeder.apply will fail with the following error:
NameError: undefined local variable or method `class_name' for #<#<Class:0x007fddad16c4b0>:0x007fddaf4f7c68>
Hi,
I'm getting an error when requiring the extension (require 'sequel/extensions/seed').
I noticed that seed.rb is not present in sequel 5.46.0, ruby version 3.0.2.
I temporarily resolved it by copying https://raw.githubusercontent.com/earaujoassis/sequel-seed/master/lib/sequel/extensions/seed.rb into the gem extensions folder.
I'm getting the following error:
LoadError: cannot load such file -- sequel/extensions/seed
this happens even after I initialize sequel-seed like so:
require 'sequel'
require 'sequel/extensions/seed'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.