Une base pour applications web basées sur Python/flask. TetaWebApp permet de coder rapidement n'importe quel type d'application web accédant ou non une base de données.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tetawebapp.sql 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. \echo ******************************
  2. \echo * Dropping database tetawebapp
  3. \echo ******************************
  4. \c postgres;
  5. drop database tetawebapp;
  6. \echo **************************
  7. \echo * Dropping role tetawebapp
  8. \echo **************************
  9. drop role tetawebapp;
  10. \echo ***************************************************
  11. \echo * Creating role tetawebapp with password tetawebapp
  12. \echo ***************************************************
  13. create role tetawebapp with LOGIN ENCRYPTED PASSWORD 'tetawebapp';
  14. \echo ******************************
  15. \echo * Creating database tetawebapp
  16. \echo ******************************
  17. create database tetawebapp;
  18. \echo *******************************************
  19. \echo * Giving tetawebapp ownership to tetawebapp
  20. \echo *******************************************
  21. alter database tetawebapp owner to tetawebapp;
  22. \echo *********************************
  23. \echo * Creating tetawebapp_users table
  24. \echo *********************************
  25. \c tetawebapp;
  26. CREATE TABLE tetawebapp_users (
  27. id serial primary key,
  28. mail text not NULL,
  29. password text not NULL,
  30. name text not NULL
  31. );
  32. \echo *************************************************
  33. \echo * Giving tetawebapp_users ownership to tetawebapp
  34. \echo *************************************************
  35. alter table tetawebapp_users owner to tetawebapp;
  36. \echo *********************************************************************
  37. \echo * Inserting user demo identified by password demo to tetawebapp_users
  38. \echo *********************************************************************
  39. insert into tetawebapp_users (mail, password, name) values ('demo', '$2b$12$yjv4QMctGJFj2HmmbF6u5uDq9ATIl/Y9Z96MbaqRrcG6AE0CGHKSS', 'demo');