similar to: Building a model from a database view

Displaying 20 results from an estimated 90 matches similar to: "Building a model from a database view"

2005 Apr 23
2
[Tip] Introspection to determine if a column may be null
I still want to get this into Rails for all connection adaptors, but for now I''ve hacked my own addition on for just PostgreSQL. The following code extends every Column object returned by MyModel.columns to support a new #required? method, which indicates if the column may or may not be null. The following is a huge hack - suggestions on a cleaner way to add this functionality
2017 Feb 05
2
Dict quota calculation errors "remote disconnected"/"broken pipe" on 2.22.
Keywords: dovecot, dict, quota, postgre sql, broken pipe, remote disconnected Having Dovecot 2.2.22 (fe789d2) with Postgre SQL 9.5 (9.5.5-0ubuntu0.16.04) as the backend. I do not understand why quota service is not working, not seeing it as a configuration error at least. My quotas are DICT/SQL based. OS: Ubuntu 16.0.4.1 32-bit (Linux XXX 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:36:54
2009 Sep 28
5
Multi-databases support
Hi, While I was hacking ovirt-server, I have found that it's currently restricted to Postgres DB. Even if I like postgres for serious work on a server, I really prefer to hack/dev locally on a Sqlite or MySQL DB. I have googled on rails in order to find a good answer for the "foreign key problem" which forces OVirt to stay on pg. I have found a plugin on this particular
2006 Jan 05
8
Repost - Do dynamic finders work with legacy schemas?
Hello everyone, I have another question related to a legacy schema I am working with. Do dynamic finders work with legacy schemas in general? The schema I am working with uses hungarian prefixes for column names. For example fOpen is 0 if a bug is closed and 1 if it is open (type smallint). When I try @bugs = Bug.find_all_by_fOpen(1), I get the following exception: undefined method
2006 Jan 19
3
problems with migrations in sql server
Is anyone using migrations with a SQL Server database who might be able to lend me a hand? I''ve used migrations with MySql in the past and haven''t run into any issues so forgive When I run rake migrate nothing is actually getting updated in my database. I created a migration using ./script/generate migration AddFooTable and updated the migration to look as follows: class
2016 Mar 24
10
C5 MySQL injection attack ("Union Select")
mysql Ver 14.12 Distrib 5.0.95, for redhat-linux-gnu (x86_64) using readline 5.1 I spotted something strange and immediately installed a routine to automatically impose an iptables block when the key used for database access is excessively long. My URL was something like this ...../...../.....php?key=123456 The injection was something like this
2019 Oct 30
2
Dovecot and MySQL aborted connections.
We also spotted these sql connections getting aborted, upon upgrading MySQL from 5.6 to 5.7. (Going back to 5.6 we don't see them!) Turning on mysql general query logging we can see it is Dovecot's mysql connections that inquire about or update quota usage in particular: *** /logs//mysql.log *** 2019-10-30T10:52:22.624690-07:00 2 Connect dovecot at localhost on npomail using
2005 Dec 15
2
Checking the existance of a NOT NULL constraint from Active Record
Hi, I'd like to check the existance of a NOT NULL constraint for a given attribute using ActiveRecord. Is this possible or do I have to painstakingly query the information_schema myself? I need this for some reflection in a custom association. Thanks, - Rowan -- Morality is usually taught by the immoral. _______________________________________________ Rails mailing list
2005 Nov 24
1
Log question
development.log contains quite a few SELECTS on system tables like COLUMNS. Wouldn''t it be more efficient to cache this info? I''m also wondering about strings like "[4;35;1m". What''s their purpose and is it possible to get rid of them? They look like screen coordinates and makes no sense in a text file. Christer Processing ReportController#create (for
2015 Aug 15
2
wordpess can't connect to DB but mediawiki can
> > [this isn't really a centos issue, even if you're using centos, > which isn't obvious. that said ...] Yeah that's true. But this list tends to be rather helpful for general problems that are less specific to centos. Sometimes. :) Really seems to depend... Incidentally I am using centos on all hosts: #cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core) OK
2017 Aug 15
3
migrating 2.1 to 3.x, sql pass scheme, pass value?
On Tue, August 15, 2017 8:03 pm, Sami Ketola wrote: > >> On 15 Aug 2017, at 2.50, voytek at sbt.net.au wrote: >> >> >> how do I generate hashed string from my password ? > > use this sql command: > > GRANT SELECT ON vmail TO ?vmail?@?127.0.0.1? IDENTIFIED BY > PASSWORD(?yourpassword?); > > > or if you just want to see the hash: > > SELECT
2008 Mar 14
15
Is anyone running Rails 2.x against a MS SQL Server DB?
I am unable to get ActiveRecord session support to work under 2.x against a SQL Server database. I''m starting to wonder if anyone is running 2.x against SQL Server? Is anyone running under the following configuration: Rails 2.x SQL Server 2000 DB (using AR adapter in ODBC mode) AR store for ActionController session store. I''d like to chat with you if you are. Thanks, Wes --
2015 Aug 15
2
wordpess can't connect to DB but mediawiki can
> > "Use" that db and then issue: > select * from db where Db='jfwiki' or Db='jokefire' order by Host; Well yeah. I used the mysql database before I issued that command. MariaDB [(none)]> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed Then if I
2006 Nov 07
19
DrySQL
DrySQL is a plug-in that extends ActiveRecord to provide a complete DRY solution for Object-Relational Mapping. You''ve defined columns, constraints, relationships, and keys on your DB. With DrySQL you don''t need to re-define any of these things in your Ruby code. If you have tables, keys, and columns that don''t follow the Rails naming conventions, have a complex
2011 Jul 17
1
ODBC MySql DB: sqlQuery empty
Dear R Beginners, Experts and Users, I already asked this question on the R-sig-DB mailing list, but sadly didn't got a reply :-( . Keeping fingers crossed that I have more luck on the main R mailinglist :) . I'm trying to connect to a MySQl database via Gnu R using the RODBC interface. The conenction workes but I get an empty result string. Gnu R and the MySql DB are running on a 64 bit
2017 Aug 14
3
migrating 2.1 to 3.x, sql pass scheme, pass value?
On Tue, August 15, 2017 8:54 am, Noel Butler wrote: > On 15/08/2017 08:18, voytek at sbt.net.au wrote: > Forget looking at dovecot at teh moment, your problem maybe mysql (I'd > hope you meant mariadb but either way...) > > use command line mysql as vmail user from your dovecot machine to test > password further BEFORE tinkering with dovecot. > > ~$ mysql -p -v vmail
2015 Aug 15
2
wordpess can't connect to DB but mediawiki can
Hey guys, I'm running both a wordpress site as well as a mediawiki off of the same web servers. The mediawiki site works great! The wordpress site, meh. Not so much. I keep getting the common database connection error: Error establishing a database connection And as far as I can tell the settings between the mediawiki site and the wordpress site are nearly identical. Here's the media
2017 Aug 14
3
migrating 2.1 to 3.x, sql pass scheme, pass value?
I'm trying to migrate from Centos 6/dovecot 2.1.17/mysql to new server on Centos 7/dovecot 2.2.31 (65cde28)/mariadb I've dumped on oldserver 'dovecot.conf' and used it on newserver doveconf -n > dovecot.conf also, transferred /etc/doveconf/*.conf I've also dumped MySQL 'vmail' and imported database, created user vmail, vmailadmin dumb question: should the password
2006 Feb 28
10
Salted hash login, postgresql, unit tests
Hello, I have tried to install the salted hash login generator by following the quick start guide at: http://wiki.rubyonrails.com/rails/pages/SaltedLoginGeneratorQuickstart. Everything seems to work fine until I try to run the unit tests by doing ''rake test_units'', then I get the following error message: <error-message> [brasse@keso login-test]$ rake test_units (in
2015 Aug 16
2
wordpess can't connect to DB but mediawiki can
> > You were doing this (looking at the mysql.db table) on your > "db.example.com" machine, correct? db.example.com is a load balanced VIP. The VIP is being handled by keepalived and HA/Proxy. There are two DB's setup in master/master replication. The two databases and two load balancers are on AWS. The web server and varnish servers are on digital ocean. I setup a grant