Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

creating the 'User' model schema in our database

  • Loading branch information...
commit 57ebf27258e5404b2c0b382c3479d3f11c7e58f1 1 parent 7ccd87c
Breno G. de Oliveira authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 tweetylicious.pl
15 tweetylicious.pl
View
@@ -21,6 +21,21 @@
#--------------------------------------#
package Model;
+use ORLite {
+ file => 'tweetylicious.db',
+ cleanup => 'VACUUM',
+ create => sub {
+ my $dbh = shift;
+ $dbh->do('CREATE TABLE user (username TEXT NOT NULL UNIQUE PRIMARY KEY,
+ password TEXT NOT NULL,
+ email TEXT,
+ gravatar TEXT,
+ bio TEXT
+ );'
+ );
+ },
+};
+
#-------------------------#
# now the web application #
Please sign in to comment.
Something went wrong with that request. Please try again.