Displaying 20 results from an estimated 78 matches for "tinyint".
2010 Jan 09
3
tinyint(1) and boolean
So i had a boolean attribute in my model which gets interpreted to
tinyint(1) in mysql by rails migrations. Now tinyint(1) accepts a
range in mysql and i want to change my boolean attribute to an
attribute which can accept 3 values(0,1,2).
I made the change to the view and when i post the form selecting the
selecting the value ''2'', it still gets saved as...
2008 Aug 28
2
1 or true in TINYINT(1) column?
Hello, there is a table that has a column TINYINT(1) called status.
Through mysql console I see its value as 1 (when is true) but if I do
this in Rails console:
Mytable.status
=> true
give me "true" rather "1".
How could I change 1 to true using some method?
Or true to 1?
--~--~---------~--~----~------------~-------~--~-...
2019 May 31
3
sieve setup. no svbin ?
On Fri, May 31, 2019 10:18 am, Ralph Seichter via dovecot wrote:
> * Voytek Eymont via dovecot:
> Try runing "sievec -u {your_linux_user} /path/to/whatever.sieve" from a
> shell and check the resulting error messages.
Raplh, thanks
so, am I'm missing sql lookup for sieve...?
# sievec -u voytek dovecot.sieve
sievec(voytek)<9667><>: Error: user voytek: Auth
2009 Mar 23
2
rails boolean and mysql tinyint(1) question?
this may seem silly but i just noticed that if in mysql the column
which is a tinyint(1) happens 2 or greater, by a chance of glitch or
corruption in the database(i did it manually ofcourse but i am
speaking hypothetically), rails would see it as false. but i find that
really wrong seeing how in mysql it sees any non-zeroes as true.
i really think if it does happen to be any number...
2006 Aug 05
3
Four Days on Rails
I''ve been reading the tutorial and I have problems with the TinyInt(1) for the attribute "item.done". I thought this thread would be the best to post it. I''m using Rails 1.1.14. When in the partial template _list_stripes appears:
<%= list_stripes["done"] == 1 ? show_image("done_ico.gif") : " " %>...
2006 Apr 04
9
Does ActiveRecord have support for "Boolean" columns?
Hey all --
I''ve been using enumerable char(1)''s with ''y'' and ''n'' values for my
Boolean columns in Rails, but it strikes me there should be a better
way.
How do you setup columns that represent true/false-ness in your
schemas on Rails?
Wondering what kind of standard approaches there are other than me
writing something like
class MyEntity
2019 Jun 09
0
sieve setup. no svbin ?
...t via dovecot wrote:
I'm still not sure what/where am I missing...?
do I need some tables in the mailbox sql file ...?
or where is the extra 'c' from ?
"Unknown column 'mailbox.enablesievec'"
I currently have like in mailbox table:
...
enablelda | tinyint(1) | NO | MUL | 1
| |
| enablemanagesieve | tinyint(1) | NO | MUL | 1
| |
| enablemanagesievesecured | tinyint(1) | NO | MUL | 1
| |
| enablesieve | tinyint(1) | NO | MUL | 1...
2002 Dec 18
1
A little problem handling logicals in RMySQL under R1.6.1
...s the MySQL connection
> con
<MySQLConnection:(1816,0)>
# here is the data frame
> print(a<-data.frame(x=c(TRUE,FALSE),y=c(FALSE,TRUE)))
x y
1 TRUE FALSE
2 FALSE TRUE
# as promised, the two data frame columns are identified as logicals and
# the field types are set to tinyint
> field.types <- sapply(a, dbDataType, dbObj = con)
> field.types
x y
"tinyint" "tinyint"
# However, in WriteTable, nothing is done to convert the logicals to 0s and 1s.
# And logically, the infile is written in TRUE and FALSE and finally, in MySQL...
2013 Apr 18
5
Dynamic realtime + queues
Hi,
?
I am trying to store queues.conf to a MySQL database using dynamic realtime. I have a working ODBC connection and the queueing system already works but I want to store the queues.conf file to a database. I am following the guide from Asterisk the definitive guide, the ebook can be found at: http://ofps.oreilly.com/titles/9781449332426/asterisk-DB.html
?
I have a database called asterisk
2006 Jun 07
1
Four Days with Rails Issue
...experiencing some problem with the "Priority" of the
item. Right from the start, RoR seems to want to consider it as a value
that must be boolean. The scaffolded code asks for "True/ False" as the
input.
PHPMyAdmin shows that the database thinks it should be an unsigned
TinyInt with a default value of 3. But, RoR seems to be confused about
it. As a result, the validation fails (cos it seems to be checking for
a "true/ false" value :in=>1..5 and does not succeed). I finally
removed the validation since it was failing and tried again. It now
adds a reco...
2019 Mar 03
2
migrating/cloning 2.2 > 2.3?
I have 2.2 installation on Centos 7, and, I'm trying to setup a new
server, and, 'clone' existing setup: Dovecot/Postfix/Mysql
on new Centos 7 installed from RPM 2.3.4.1 (3c0b8769e)
I then copied/overwrote from old to new /etc/dovecot/*.conf (but not
conf.d files), created self certs in place of old server certs
and, started Dovecot
is that totally dumb, and, how should I do this,
2004 May 10
3
sqlSave with underscores in table fieldname
...FALSE, nastring = -999999, fast = FALSE)
This is giving me an error:
Error in sqlSave(channel, temp6, tablename = "series_indices_test", append = TRUE, :
unable to append to table %sseries_indices_test
My table definition is:
ind_id smallint(3)
ser_id smallint(4)
period_id tinyint(2)
year smallint(4)
calc mediumint(6)
mean mediumint(6)
This error is related to the underscores I use in the table. Because, when I change the table definition to (removing underscores):
indid smallint(3)
serid smallint(4)
periodid tinyint(2)
year smallint(4)
calc mediumint(6)
mean mediumint(6)...
2009 Nov 11
4
Schema dump does not reflect column size limit
...| NULL | |
| author_bet_id | int(11) | YES | | NULL | |
| author_comment | text | YES | | NULL | |
| created_at | datetime | YES | | NULL | |
| confirmed | tinyint(1) | YES | | NULL | |
| admin_comment | text | YES | | NULL | |
| confirmed_at | datetime | YES | | NULL | |
| bet_id | int(11) | YES | MUL | NULL | |
| user_id...
2010 May 01
1
I need some help joining data from 3 MySQL tables, please
...T NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`username` varchar(150) NOT NULL default '',
`email` varchar(100) NOT NULL default '',
`password` varchar(100) NOT NULL default '',
`usertype` varchar(25) NOT NULL default '',
`block` tinyint(4) NOT NULL default '0',
`sendEmail` tinyint(4) default '0',
`gid` tinyint(3) unsigned NOT NULL default '1',
`registerDate` datetime NOT NULL default '0000-00-00 00:00:00',
`lastvisitDate` datetime NOT NULL default '0000-00-00 00:00:00',
`activation...
2006 Jan 03
6
Am I going too far or Rails is just confusing? was {validates_presence_of *_id attributes}
...(the question still
relates to the previous posts by me):
I have provided full steps to reproduce the symptoms.
If it matters, I''m running Ruby 1.8.2, Rails 1.0, and MySQL 5.0.15 on
Windows XP Professional.
1. First, the setup
MySQL
-----
create database testdb;
create table ranks (id tinyint unsigned not null auto_increment,
description varchar(50) not null unique, primary key(id));
create table customers (id mediumint unsigned not null auto_increment,
name varchar(50) not null,
phone varchar(25), address varchar(50), rank_id tinyint unsigned not
null, primary key(id),
foreign key (ra...
2011 Oct 10
1
To query two SQL tables for user verification over LMTP, should I use (a) two separate lookups? or (b) just one lookup with a boolean query?
...e and a
'aliases' table, where each user can have many aliases.
I want to have Postfix check Dovecot's SASL/LMTP passdb to see if a
<user>@<domain> exists. If yes, deliver through LMTP. If NO, reject
it.
Here are the table definitions so far,
CREATE TABLE user (
userid TINYINT,
user VARCHAR(64),
domain VARCHAR(128),
password VARCHAR(64),
PRIMARY KEY (userid),
UNIQUE (user,domain)
);
CREATE TABLE alias (
aliasid TINYINT,
alias VARCHAR(64),
user VARCHAR(64),
domain VARCHAR(128),
PRIMARY KEY (aliasid),
UNIQUE (domain,user,alias),
CONSTRAINT fk_alias1 FOREIGN KE...
2006 Aug 05
10
Converting mysql to postgres
Hi,
Anyone got any cool tricks for converting a Rails site (in this case,
a typo installation) from a mysql database to a postgresql database?
I''ve got it almost working -- I''m doing a SQL dump from mysql and
loading it into postgres. However, mysql does booleans as a tinyint
with 0 = false and 1 = true. When I try to import that into a
postgres database that expects booleans to be actual booleans, it
fails.
Any ideas?
Thanks,
Joe
2005 Nov 18
6
wrong number of arguments (2 for 1) error message help
...uot;
ActiveRecord::Schema.define do
create_table(itemtablename, :options => ''ENGINE=InnoDB
DEFAULT CHARSET=utf8'') do |t|
t.column :field_type, :string, :null => false
t.column :body, :text, :null => true
t.column :required, :tinyint, :null => false, :default => ''0''
t.column :demographic, :tinyint, :null => false, :default
=> ''0''
t.column :image, :text, :null => true
end
end
# right now we are displaying this flash for debugging purposes...
2019 Mar 03
0
migrating/cloning 2.2 > 2.3?
...h.pem
Mar 03 16:23:57 imap-login: Info: Login: user=<voytek at sbt.net.au>,
method=PLAIN,
rip=110.175.246.167, lip=103.106.168.106, mpid=2757, TLS,
session=<283B2CmDccdu
r/an>
I'll do the dh.pem next
//these are SQL mods I've done
ALTER TABLE mailbox ADD COLUMN enableimaptls TINYINT(1) NOT NULL DEFAULT 1;
ALTER TABLE mailbox ADD INDEX (enableimaptls);
ALTER TABLE mailbox ADD COLUMN enablepop3tls TINYINT(1) NOT NULL DEFAULT 1;
ALTER TABLE mailbox ADD INDEX (enablepop3tls);
ALTER TABLE mailbox ADD COLUMN enablesievetls TINYINT(1) NOT NULL DEFAULT 1;
ALTER TABLE mailbox ADD INDEX...
2006 May 31
2
Storing a NULL value from a radio_button
Hi, I''ve a boolean database field (tinyint(1)) wich allows nulls.
Then, I''ve something like this:
radio_button(''server'',''customer_has_login'',"NULL")
radio_button(''server'',''customer_has_login'',true)
radio_button(''server'',''cu...