Mojolicious-Plugin-RoutesAuthDBI
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/RoutesAuthDBI/Schema.pm view on Meta::CPAN
create table IF NOT EXISTS "{%= $schema %}"."{%= $tables->{logs} %}" (
ts timestamp without time zone NOT NULL DEFAULT now(),
user_id int not null, --- and profile or guest id
route_id int,
url text, --- if none route_id
status int not null, --- http
elapsed numeric not null ---seconds from mojo.timer
);
@@ drop
--drop table "{%= $schema %}"."{%= $tables->{refs} %}" cascade;
--drop table "{%= $schema %}"."{%= $tables->{logins} %}" cascade;
--drop table "{%= $schema %}"."{%= $tables->{profiles} %}" cascade;
--drop table "{%= $schema %}"."{%= $tables->{roles} %}" cascade;
--drop table "{%= $schema %}"."{%= $tables->{routes} %}" cascade;
--drop table "{%= $schema %}"."{%= $tables->{controllers} %}" cascade;
--drop table "{%= $schema %}"."{%= $tables->{actions} %}" cascade;
--drop table "{%= $schema %}"."{%= $tables->{namespaces} %}" cascade;
--drop table "{%= $schema %}"."{%= $tables->{oauth_sites} %}" cascade;
--drop table "{%= $schema %}"."{%= $tables->{oauth_users} %}" cascade;
drop schema "{%= $schema %}" cascade;
drop sequence {%= $sequence %};
@@ flush
delete from "{%= $schema %}"."{%= $tables->{refs} %}";
delete from "{%= $schema %}"."{%= $tables->{logins} %}";
delete from "{%= $schema %}"."{%= $tables->{profiles} %}";
delete from "{%= $schema %}"."{%= $tables->{roles} %}";
delete from "{%= $schema %}"."{%= $tables->{routes} %}";
delete from "{%= $schema %}"."{%= $tables->{controllers} %}";
delete from "{%= $schema %}"."{%= $tables->{namespaces} %}";
( run in 1.001 second using v1.01-cache-2.11-cpan-49f99fa48dc )