]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
changed password field length to 15 to fix [ticket:656]
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 14 Jul 2007 18:30:43 +0000 (18:30 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 14 Jul 2007 18:30:43 +0000 (18:30 +0000)
doc/build/content/tutorial.txt

index 464d3044bcd97ed193af398a3a554f2628de64bf..615f275f9ac41ed67cd29d96b9fef6df45149193 100644 (file)
@@ -105,7 +105,7 @@ With `metadata` as our established home for tables, lets make a Table for it:
     >>> users_table = Table('users', metadata,
     ...     Column('user_id', Integer, primary_key=True),
     ...     Column('user_name', String(40)),
-    ...     Column('password', String(10))
+    ...     Column('password', String(15))
     ... )
 
 As you might have guessed, we have just defined a table named `users` which has three columns: `user_id` (which is a primary key column), `user_name` and `password`. Currently it is just an object that doesn't necessarily correspond to an existing table in our database.  To actually create the table, we use the `create()` method.  To make it interesting, we will have SQLAlchemy echo the SQL statements it sends to the database, by setting the `echo` flag on the `Engine` associated with our `MetaData`:
@@ -116,7 +116,7 @@ As you might have guessed, we have just defined a table named `users` which has
     CREATE TABLE users (
         user_id INTEGER NOT NULL,
         user_name VARCHAR(40),
-        password VARCHAR(10),
+        password VARCHAR(15),
         PRIMARY KEY (user_id)
     )
     ...