similar to: create_table and char columns

Displaying 20 results from an estimated 30000 matches similar to: "create_table and char columns"

2006 Jan 08
0
Migration doesn''t seem to preserve create_table options in schema
Hi, I have the following migration (abbreviated): class Initial < ActiveRecord::Migration def self.up create_table :messages, :options => ''ENGINE=MyISAM'', :force => true do |t| t.column :id, :integer, :null => false t.column :external_id, :string, :null => false t.column :recipients_count, :integer, :default => 0
2006 Jan 12
1
Best Forum? Was: Migration doesn''t seem to preserve create_table options in schema
Hi, is this the best forum to answer this question? Is there any better source for information or another mailinglist to address this question to? Cheers, Mariano ---------- Forwarded message ---------- From: Mariano Kamp <mariano.kamp@gmail.com> Date: Jan 8, 2006 6:24 PM Subject: Migration doesn''t seem to preserve create_table options in schema To: rails@lists.rubyonrails.org
2006 Apr 04
0
making a set column type with create_table
create_table(:username, :options => ''ENGINE=MyISAM DEFAULT CHARSET=utf8'') do |table| table.column :name, :string # THE LINE BELOW FAILS table.column :tag, :set ... ... end Hello all, I''d like to make a set column with the create_table method. I''ve googled around some, but did not find an answer. Is this possible with
2006 Apr 22
7
Proper Database Design For A Newbie
Hi all, I am starting out learning Ruby on Rails (coming from a PHP background) and I have a question about proper database design. Let me give you a quick example of what I want to do: Database: CREATE TABLE `users` ( `id` int(11) NOT NULL auto_increment, `login` varchar(40) default NULL, `email` varchar(100) default NULL, `crypted_password` varchar(40) default NULL, `salt`
2010 Jul 19
1
Unknown column username in where clause
Version: Dovecot 2.0 rc2 I'm testing Dovecot with MySQL quotas but I get always this error for incoming mails: tux dovecot: lmtp(4928): Error: user testuser at dlutt.de: Auth USER lookup failed tux dovecot: auth: Error: mysql: Query failed, retrying: Unknown column 'username' in 'where clause' I dont' know where the field "username" should come from because I
2010 May 01
1
I need some help joining data from 3 MySQL tables, please
Hi all, I am trying to display collective data from 3 MySQL tables: The query I have, so far, is SELECT c . * , COUNT( m.id ) AS `members` FROM `jos_mls_teams` AS `c` LEFT JOIN `jos_mls_teams_members` AS `m` ON m.teamid = c.id RIGHT JOIN ( SELECT u.name, u.lastvisitDate FROM `jos_users` AS `u` ) ON u.id = m.userid GROUP BY c.id LIMIT 0 , 30 But get the following error: #1248 - Every derived
2005 Dec 23
4
OO model style: inheritance
Hi everybody I am totally new to rails and I am trying to start a tiny project to get familiar with rails. But I already got my first problem and I would be happy if somebody could point me in the best and cleanest direction. I am trying to develop a small gallery app. Since I would like to add more features in future I am trying to design a clean OO architecture of my models: The base object
2008 Dec 05
0
Bug in schema.rb generation during db:migrate
I am thinking that I have found a bug in Rails migrations. My app is using UUIDtools to generate guids for primary keys. To do this I pass :id=>false and then create my own id column as shown below. Next I leverage "execute" to create an index. It seems to work fine. The table in MySql is perfect. However the ID column and primary key on the ID column are not in the schema.rb file I
2008 Apr 30
4
Beginner mysql problem
I am new to rails and have come across a problem with a sample application I was working on. When trying to use rake migrate I got the error listed below. my db file contains the following class ContactDb < ActiveRecord::Migration def self.up create_table "people" do |t| t.column "id", :integer t.column "name",
2005 Mar 03
2
table lookup?
Ok, I''ve been messing with ror for a few days, but I''m stumped here. Here are my tables. CREATE TABLE `steps` ( `id` int(10) unsigned NOT NULL auto_increment, `step_infos_id` int(10) unsigned NOT NULL default ''0'', `translator_id` int(10) unsigned NOT NULL default ''0'', `Sequence` int(11) NOT NULL default ''0'',
2005 Dec 12
2
count sql failing with unknown table....
Hey Rails People, I''m doing my first Rails app and I''m having a newbie problem with the count method.... Mysql::Error: #42S02Unknown table ''jobs_sectors'' in where clause: SELECT COUNT(*) FROM jobs WHERE (jobs_sectors.sector_id = 1 ) Extracted source (around line #4): 1: <div class="sectors"> 2: <ul> 3: <% for sector in @sectors
2013 Nov 15
0
[LLVMdev] Buildbot skipping commits?
It's a bug in buildbot. Longer (than 1024, I guess) commit message might let buildbot commits ignored. When buildbot is configured with mysql, such a check is done. FYI, my buildbot tweaks longer commit log, for example; http://bb.pgr.jp/changes/24995 (Snipping is done not in the buildmaster, but on the commit feeder) That said, I wish every guys would not be made afraid of commit message...
2007 Apr 15
1
help:How to set default value for a column use of migration?
hi,all.. Here i want to use of migration to create a table and set a defult value for a column..but i cant''t finished.. mycode: class CreateMessages < ActiveRecord::Migration def self.up create_table :messages do |t| t.column :name, :string t.column :content, :text t.column :posttime, :datetime, :default => "now()" end end def
2004 Dec 21
3
What is sip-friends.sql??????
maybe a dumb question but what do we have here??? sip-friends.sql # # Table structure for table `sipfriends` # CREATE TABLE `sipfriends` ( `name` varchar(40) NOT NULL default '', `secret` varchar(40) NOT NULL default '', `context` varchar(40) NOT NULL default '', `username` varchar(40) default '', `ipaddr` varchar(20) NOT NULL default '',
2007 Aug 05
0
Newbie - Question on Parent child updating
All, I''ve just started Rails and Ruby a week or so ago. Please forgive me for my ignorance. I started writing a small test application to test some of my new knowledge and have hit a wall. Would like some best practices. I have 3 tables, as below... CREATE TABLE `carts` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `quantity` int(11) NOT NULL, PRIMARY
2006 Jan 18
3
I need superman!
I have a legacy database that I can''t figure out. I''ve tried hundres of times and spent way tooooo much time trying to figure this out. I don''t think that rails can do it. Maybe there is a superman here who can get this too work. I''m going to post my sql dump to produce a very simple database. If anyone can get rails to work with this THEY WILL BE MY
2010 Aug 04
1
IMAP/POP3 Proxy Redundancy
Looking over the list archives and Wiki there doesn't seem to be any sort of built-in host redundancy with the proxy. I would prefer to use a built in though it doesn't look like this is possible. One of the suggestions that I found in the list archives was to write a script which checks the health of the hosts and adjusts the MySQL table accordingly. Has anyone done anything like
2006 Jan 04
5
habtm recusive
I have a people table: CREATE TABLE people ( id int(10) unsigned NOT NULL auto_increment, first_name varchar(75) default NULL, middle_name varchar(75) default NULL, last_name varchar(75) default NULL, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1272 ; and a people_people table: CREATE TABLE people_people ( person_id int(11) unsigned NOT NULL,
2006 Jul 04
1
LoginGenerator Problem
I am trying to make a barebones login system based on this example (which in turn is just standard RoR login) but when I enter a user name and password, it says the login is unsuccessful every time. I am not sure where I am going wrong. Here is all relevent information CREATE TABLE `users` ( `id` int(6) unsigned NOT NULL auto_increment, `login` varchar(20) NOT NULL default
2009 Aug 31
3
Migration - wrong SQL statement is created
Hi, I am doing my first steps with RoR and I have the following problem: I execute my migration file with the following content on a MySQL-database via Rake: <code> class CreateUsers < ActiveRecord::Migration def self.up create_table :users do |t| t.integer :id t.string :username, :size => 100 t.string :password, :size => 100 t.string :email, :size