Commit d805af6766912080dbb7363d58f74cc82122ffaf

Authored by Mariana Gomes
0 parents
Exists in master

Submissão Inicial

LEIAME.txt 0 → 100644
  1 +++ a/LEIAME.txt
... ... @@ -0,0 +1,73 @@
  1 +
  2 +Amadeus Learning Management System
  3 +==================================
  4 +
  5 +O Projeto Amadeus visa o desenvolvimento de um sistema de gestão da aprendizagem
  6 +de segunda geração, baseado no conceito de blended learning. O Projeto permite
  7 +extender as experiências adquiridas de usuários de educação a distância para
  8 +diversas plataformas (Internet, desktop, celulares, PDAs, e futuramente TV Digital)
  9 +de forma integrada e consistente. Essa ampliação das formas de interação dos
  10 +usuários com os conteúdos e dos usuários entre eles permite a implementação de
  11 +novas estratégias de ensino e de aprendizagem orientadas por teorias construtivistas
  12 +ou sócio-interacionistas do desenvolvimento humano.
  13 +Com este Projeto de ambiente virtual de aprendizagem desejamos contribuir com o
  14 +desenvolvimento social pela formação e educação para todas(os) e ao longo de toda
  15 +vida e para além das fronteiras que separam os estados e as nações.
  16 +
  17 +Ele está sendo lançado como um projeto GPL a fim de criar um envolvimento da
  18 +comunidade no seu desenvolvimento.
  19 +
  20 +Nós também dispomos de um portal com tudo sobre AmadeusLMS Projeto, tanto para
  21 +os usuários quanto para potenciais desenvolvedores em http://www.softwarepublico.gov.br .
  22 +
  23 +Guia de Instalação Rápida
  24 +=========================
  25 +
  26 +O processo de instalação do amadeus é muito simples, o que pode gerar um pouco de trabalho
  27 +é a instalação dos periféricos, que são: PostgreSQL8.3 ou 8.4 , Tomcat 6.0.xx e a JDK(JAVA). Para maiores
  28 +detalhes de como instalar o software procure o arquivo de instalação que se encontra
  29 +em /docs. Nele você vai encontrar um passo a passo de como instalar todos esses periféricos.
  30 +
  31 +Vamos então a instalação propriamente do AmadeusLMS. A última versão do Amadeus é a 00.95.00.
  32 +
  33 +Antes é preciso baixar a versão, no caso, ter em mãos o arquivo chamado AmadeusLMS-v00.95.00.zip
  34 +que pode ser encontrado na seguinte URL:
  35 +
  36 +http://www.softwarepublico.gov.br/dotlrn/clubs/amadeus/file-storage/index?folder_id=27751377
  37 +
  38 +Basta fazer o download da versão mais recente.
  39 +
  40 +Começando o processo de instalação:
  41 +
  42 + 1. Extraia o arquivo AmadeusLMS-v00.96.30.zip;
  43 +
  44 + 2. Crie um banco de dados qualquer para a sua aplicação(recomendado: amadeus_web) e
  45 + execute dentro dele o script /scripts/amadeuslms_web-v00.96.30.sql.
  46 +
  47 + 3. Crie novamente outro banco de dados para a sua aplicação mobile com database name:
  48 + amadeus_mobile e execute dentro dele o script /scripts/amadeuslms_mobile-v00.96.30.sql.
  49 +
  50 + 4. Verifique a existência de um arquivo que fica em /WEB-INF/classes/hibernate.cfg.xml,
  51 + esse arquivo fica dentro do arquivo /app/amadeuslms.war, que deve ser configurado da
  52 + mesma forma que seu banco foi criado. A seguir temos um exemplo:
  53 +
  54 + <property name="hibernate.connection.
  55 + url">jdbc:postgresql://localhost:5432/amadeus_web</property> # Nessa linha deve ser colocado o nome do banco de dados
  56 + <property name="hibernate.connection.username">postgres</property> # Nessa linha deve ser colocado o nome do usuário do banco
  57 + <property name="hibernate.connection.password">postgres</property> # Nessa linha deve ser colocado o a senha desse usuário
  58 +
  59 + OBS: na primeira linha devemos ficar atento ao nome da base de dados criada no postgres
  60 + por você no passo 2. Na segunda linha, trata-se do usuário que a aplicação usará para manipular
  61 + os dados no banco, ou seja, deve ser criado um usuário(owner) com total permissão de
  62 + acesso a base criada.
  63 +
  64 + 5. Coloque o arquivo amadeuslms.war dentro do pasta $CATALINA_HOME/webapps($CATALINA_HOME
  65 + é o diretório raiz do seu Tomcat) do seu servidor de aplicação.
  66 +
  67 + 6. Acesse a página para testar se tudo funcionou: http://localhost:8080/amadeuslms
  68 +
  69 +
  70 +Autor: Thiago Araujo - Gerente de implantação do Amadeus pela VH Consultores(referência em implantação e suporte do AmadeusLMS)
  71 +Visite: http://www.abble.com.br
  72 +
  73 +Equipe AmadeusLMS
... ...
LEIAME.txt~ 0 → 100644
  1 +++ a/LEIAME.txt~
... ... @@ -0,0 +1,73 @@
  1 +
  2 +Amadeus Learning Management System
  3 +==================================
  4 +
  5 +O Projeto Amadeus visa o desenvolvimento de um sistema de gestão da aprendizagem
  6 +de segunda geração, baseado no conceito de blended learning. O Projeto permite
  7 +extender as experiências adquiridas de usuários de educação a distância para
  8 +diversas plataformas (Internet, desktop, celulares, PDAs, e futuramente TV Digital)
  9 +de forma integrada e consistente. Essa ampliação das formas de interação dos
  10 +usuários com os conteúdos e dos usuários entre eles permite a implementação de
  11 +novas estratégias de ensino e de aprendizagem orientadas por teorias construtivistas
  12 +ou sócio-interacionistas do desenvolvimento humano.
  13 +Com este Projeto de ambiente virtual de aprendizagem desejamos contribuir com o
  14 +desenvolvimento social pela formação e educação para todas(os) e ao longo de toda
  15 +vida e para além das fronteiras que separam os estados e as nações.
  16 +
  17 +Ele está sendo lançado como um projeto GPL a fim de criar um envolvimento da
  18 +comunidade no seu desenvolvimento.
  19 +
  20 +Nós também dispomos de um portal com tudo sobre AmadeusLMS Projeto, tanto para
  21 +os usuários quanto para potenciais desenvolvedores em http://www.softwarepublico.gov.br .
  22 +
  23 +Guia de Instalação Rápida
  24 +=========================
  25 +
  26 +O processo de instalação do amadeus é muito simples, o que pode gerar um pouco de trabalho
  27 +é a instalação dos periféricos, que são: PostgreSQL , Tomcat e a JVM. Para maiores
  28 +detalhes de como instalar o software procure o arquivo de instalação que se encontra
  29 +em /docs. Nele você vai encontrar um passo a passo de como instalar todos esses periféricos.
  30 +
  31 +Vamos então a instalação propriamente do AmadeusLMS. A última versão do Amadeus é a 00.95.00.
  32 +
  33 +Antes é preciso baixar a versão, no caso, ter em mãos o arquivo chamado AmadeusLMS-v00.95.00.zip
  34 +que pode ser encontrado na seguinte URL:
  35 +
  36 +http://www.softwarepublico.gov.br/dotlrn/clubs/amadeus/file-storage/index?folder_id=27751377
  37 +
  38 +Basta fazer o download da versão mais recente.
  39 +
  40 +Começando o processo de instalação:
  41 +
  42 + 1. Extraia o arquivo AmadeusLMS-v00.96.30.zip;
  43 +
  44 + 2. Crie um banco de dados qualquer para a sua aplicação(recomendado: amadeus_web) e
  45 + execute dentro dele o script /scripts/amadeuslms_web-v00.96.30.sql.
  46 +
  47 + 3. Crie novamente outro banco de dados para a sua aplicação mobile com database name:
  48 + amadeus_mobile e execute dentro dele o script /scripts/amadeuslms_mobile-v00.96.30.sql.
  49 +
  50 + 4. Verifique a existência de um arquivo que fica em /WEB-INF/classes/hibernate.cfg.xml,
  51 + esse arquivo fica dentro do arquivo /app/amadeuslms.war, que deve ser configurado da
  52 + mesma forma que seu banco foi criado. A seguir temos um exemplo:
  53 +
  54 + <property name="hibernate.connection.
  55 + url">jdbc:postgresql://localhost:5432/amadeus_web</property> # Nessa linha deve ser colocado o nome do banco de dados
  56 + <property name="hibernate.connection.username">postgres</property> # Nessa linha deve ser colocado o nome do usuário do banco
  57 + <property name="hibernate.connection.password">postgres</property> # Nessa linha deve ser colocado o a senha desse usuário
  58 +
  59 + OBS: na primeira linha devemos ficar atento ao nome da base de dados criada no postgres
  60 + por você no passo 2. Na segunda linha, trata-se do usuário que a aplicação usará para manipular
  61 + os dados no banco, ou seja, deve ser criado um usuário(owner) com total permissão de
  62 + acesso a base criada.
  63 +
  64 + 5. Coloque o arquivo amadeuslms.war dentro do pasta $CATALINA_HOME/webapps($CATALINA_HOME
  65 + é o diretório raiz do seu Tomcat) do seu servidor de aplicação.
  66 +
  67 + 6. Acesse a página para testar se tudo funcionou: http://localhost:8080/amadeuslms
  68 +
  69 +
  70 +Autor: Thiago Araujo - Gerente de implantação do Amadeus pela VH Consultores(referência em implantação e suporte do AmadeusLMS)
  71 +Visite: http://www.abble.com.br
  72 +
  73 +Equipe AmadeusLMS
... ...
README.md 0 → 100644
  1 +++ a/README.md
... ...
README.txt 0 → 100644
  1 +++ a/README.txt
... ... @@ -0,0 +1,77 @@
  1 +
  2 +Amadeus Learning Management System
  3 +==================================
  4 +
  5 +The Amadeus LMS project aims at the development of a second generation learning
  6 +management system, based on the blended learning concept. It can be accessed
  7 +through several platforms (Internet, desktop applications, mobile phones, PDAs
  8 +and soon interactive TV). The wide spread of the interaction forms with the content
  9 +and users allows the implementation of differente teaching strategies, constructivity
  10 +or social-interactive ones.
  11 +We wish to contribute with our society, and the overall development of our country
  12 +as well. Cause we believe that both tools and developed methods offered to the
  13 +educational systems are significant contributions to obtain improvements in education,
  14 +which is an essential field to increase the quality of life in our territory.
  15 +
  16 +It is being released as a GPL project to gather community involvement in its
  17 +development. More information can be found at the following URL:
  18 +
  19 +We have also provided a portal with everything about AmadeusLMS Project, both for users and
  20 +potential developers at http://www.softwarepublico.gov.br .
  21 +
  22 +We welcome you to send patches, bug fixes and other contributions to our Redmine(Bug Track System: http://amadeusdev.cin.ufpe.br/redmine).
  23 +Please see the CONTRIB file for more details into how to do so.
  24 +
  25 +
  26 +Quick Instalation guide
  27 +=======================
  28 +
  29 +The AmadeusLMS installation process is very simple, which can generate a bit of work
  30 +is the installation of it peripherals softwares, which are: PostgreSQL8.3 or 8.4, Tomcat 7 and the JDK(JAVA). For more
  31 +details of how to install the software, find out the folder /docs. There
  32 +you will find a step by step how to install all these peripherals.
  33 +
  34 +We will then install the proper AmadeusLMS. The latest version of Amadeus, 00.96.30.
  35 +
  36 +First of all, you need to download the version, in case, will need the file called AmadeusLMS-v00.96.30.zip
  37 +which can be found at the following URL:
  38 +
  39 +http://www.softwarepublico.gov.br/dotlrn/clubs/amadeus/file-storage/index?folder_id=27751377
  40 +
  41 +In it, there is only the mobile and web-app, the games are not yet stable for production,
  42 +if you're intrested to see amadeus games just creckout the project, then you can test it.
  43 +
  44 +Begining the installation process:
  45 +
  46 + 1. Extract the file AmadeusLMS-v00.96.30.zip;
  47 +
  48 + 2. Create a database for any application (recommended: amadeus_web) and
  49 + run inside the script / scripts/amadeuslms_web-v00.96.30.sql.
  50 +
  51 + 3. Re-create another database for your mobile application with database name:
  52 + amadeus_mobile and run inside the script / scripts/amadeuslms_mobile-v00.96.30.sql.
  53 +
  54 + 4. Check for a file that is in / WEB-INF/classes/hibernate.cfg.xml,
  55 + this file is inside the / app / amadeuslms.war, which must be configured
  56 + Like his bank was created. The following is an example:
  57 +
  58 + <property name = "hibernate.connection.
  59 + url "> jdbc: postgresql: / / localhost: 5432/amadeus_web </ property> this line should be placed the name of the database
  60 + <property name="hibernate.connection.username"> postgres </ property> this line should be placed the name of Database User
  61 + <property name="hibernate.connection.password"> postgres </ property> this line should be placed oa password for that User
  62 +
  63 + Note: the first line should be attentive to the name of the database built in postgres
  64 + by you in step 2. In the second line, it is the User that the application will use to handle
  65 + the data in the database, ie, there must be a User (owner) with full permission
  66 + access o basic set up.
  67 +
  68 + 5. Place the file in the folder amadeuslms.war $ CATALINA_HOME / webapps ($ CATALINA_HOME
  69 + is the root directory of your Tomcat) of your application server.
  70 +
  71 + 6. Access the page to test if everything worked: http://localhost:8080/amadeuslms
  72 +
  73 +
  74 +Autor: Thiago Araujo - Manager of deployment Amadeus by VH Consultores(reference of implementation and support AmadeusLMS)
  75 +Visit: http://www.abble.com.br
  76 +
  77 +The AmadeusLMS Team
... ...
README.txt~ 0 → 100644
  1 +++ a/README.txt~
... ... @@ -0,0 +1,77 @@
  1 +
  2 +Amadeus Learning Management System
  3 +==================================
  4 +
  5 +The Amadeus LMS project aims at the development of a second generation learning
  6 +management system, based on the blended learning concept. It can be accessed
  7 +through several platforms (Internet, desktop applications, mobile phones, PDAs
  8 +and soon interactive TV). The wide spread of the interaction forms with the content
  9 +and users allows the implementation of differente teaching strategies, constructivity
  10 +or social-interactive ones.
  11 +We wish to contribute with our society, and the overall development of our country
  12 +as well. Cause we believe that both tools and developed methods offered to the
  13 +educational systems are significant contributions to obtain improvements in education,
  14 +which is an essential field to increase the quality of life in our territory.
  15 +
  16 +It is being released as a GPL project to gather community involvement in its
  17 +development. More information can be found at the following URL:
  18 +
  19 +We have also provided a portal with everything about AmadeusLMS Project, both for users and
  20 +potential developers at http://www.softwarepublico.gov.br .
  21 +
  22 +We welcome you to send patches, bug fixes and other contributions to our Redmine(Bug Track System: http://amadeusdev.cin.ufpe.br/redmine).
  23 +Please see the CONTRIB file for more details into how to do so.
  24 +
  25 +
  26 +Quick Instalation guide
  27 +=======================
  28 +
  29 +The AmadeusLMS installation process is very simple, which can generate a bit of work
  30 +is the installation of it peripherals softwares, which are: PostgreSQL, Tomcat and the JVM. For more
  31 +details of how to install the software, find out the folder /docs. There
  32 +you will find a step by step how to install all these peripherals.
  33 +
  34 +We will then install the proper AmadeusLMS. The latest version of Amadeus, 00.96.30.
  35 +
  36 +First of all, you need to download the version, in case, will need the file called AmadeusLMS-v00.96.30.zip
  37 +which can be found at the following URL:
  38 +
  39 +http://www.softwarepublico.gov.br/dotlrn/clubs/amadeus/file-storage/index?folder_id=27751377
  40 +
  41 +In it, there is only the mobile and web-app, the games are not yet stable for production,
  42 +if you're intrested to see amadeus games just creckout the project, then you can test it.
  43 +
  44 +Begining the installation process:
  45 +
  46 + 1. Extract the file AmadeusLMS-v00.96.30.zip;
  47 +
  48 + 2. Create a database for any application (recommended: amadeus_web) and
  49 + run inside the script / scripts/amadeuslms_web-v00.96.30.sql.
  50 +
  51 + 3. Re-create another database for your mobile application with database name:
  52 + amadeus_mobile and run inside the script / scripts/amadeuslms_mobile-v00.96.30.sql.
  53 +
  54 + 4. Check for a file that is in / WEB-INF/classes/hibernate.cfg.xml,
  55 + this file is inside the / app / amadeuslms.war, which must be configured
  56 + Like his bank was created. The following is an example:
  57 +
  58 + <property name = "hibernate.connection.
  59 + url "> jdbc: postgresql: / / localhost: 5432/amadeus_web </ property> this line should be placed the name of the database
  60 + <property name="hibernate.connection.username"> postgres </ property> this line should be placed the name of Database User
  61 + <property name="hibernate.connection.password"> postgres </ property> this line should be placed oa password for that User
  62 +
  63 + Note: the first line should be attentive to the name of the database built in postgres
  64 + by you in step 2. In the second line, it is the User that the application will use to handle
  65 + the data in the database, ie, there must be a User (owner) with full permission
  66 + access o basic set up.
  67 +
  68 + 5. Place the file in the folder amadeuslms.war $ CATALINA_HOME / webapps ($ CATALINA_HOME
  69 + is the root directory of your Tomcat) of your application server.
  70 +
  71 + 6. Access the page to test if everything worked: http://localhost:8080/amadeuslms
  72 +
  73 +
  74 +Autor: Thiago Araujo - Manager of deployment Amadeus by VH Consultores(reference of implementation and support AmadeusLMS)
  75 +Visit: http://www.abble.com.br
  76 +
  77 +The AmadeusLMS Team
... ...
app/amadeuslms.war 0 → 100644
No preview for this file type
docs/changeLog.txt 0 → 100644
  1 +++ a/docs/changeLog.txt
... ... @@ -0,0 +1,96 @@
  1 +
  2 +Amadeus Learning Management System ChangeLog
  3 +============================================
  4 +Versão 0.96.30
  5 +
  6 + * Correção de 12 bugs do conhecidos do Sistema
  7 + * Criação de webservices para acesso da aplicação amadeus para Android
  8 + * Release do Amadeus Games.
  9 + * Criação de interfaces de visualização para os docentes.
  10 + * Atualização do perfil depois da conta criada. Não aceita a atualização.
  11 + * Não aceita posts no fórum com textos longos (mais de 256 caracteres). Aumentado para 9000.
  12 + * Não aceita nomes muito extensos de arquivos quando estão para serem colocados no ambiente (nomes com mais de 90 caracteres + sua extensão).
  13 + * Depois do curso criado, não aceita um novo professor para o curso, só aquele que o criou. Agora é possivel trocar o professor no meio da execução de um curso.
  14 + * Na criação dos módulos palavras acentuas ficam como caracteres especiais. Agora o Amadeus está todo em UFT8.
  15 + * Remoção dos WEB Services antigos SOAP que usavam a especificação JAXWS.
  16 + * Criação da funcionalidade de rodar Flash(SWF) no amadeus.
  17 + * Publicação do Amadeus para a plataforma Android.
  18 +
  19 +
  20 +Versão 0.95.00
  21 +
  22 + * Gerenciador de cursos: nele é possivel listar e agrupar cursos. Facilita muito o traba-
  23 + lho do administrador de onde a instância do Amadeus está instalada.
  24 + * Replicação de cursos: agora é possível replicar seu curso/disciplina de forma automatica
  25 + a partir dessa nova feature do Amadeus.
  26 + * Manual de instalação para Windows.
  27 +
  28 +
  29 +Versão 0.93.90:
  30 +
  31 + * Corrigir a data de permisssão para o aluno responder as avaliações,pois independente da
  32 + data, termina expirando às 00:00h do dia anterior ao disponibilizado.
  33 + * Problema em editar Avaliação, a data de termino da avaliação fica setada fica com 00:00,
  34 + onde era para está 23:59.
  35 + * Duplicação de matricula de alunos.
  36 + * Corrigir a data de permissão para o aluno responder as avaliações.
  37 + * Duplicação de respostas de avaliação(alunos);
  38 + * Relação de usuários do sistema em Ordem alfabetica;
  39 + * Relação das notas do curso em Ordem alfabetica;
  40 + * Remover nome de adicionar Contato, na tela de perfil do usuário.
  41 + * Tratar o retorno para alunos que responderam a prova e que também expirou o prazo para
  42 + realização da mesma;
  43 + * Corrigir Atividade ao invés de Corrigir Prova, no botão de terminar a avaliação;
  44 + * Refatoração completa do modulo de avaliação(corrigido mais de 10 bugs);
  45 + * Os gabaritos dos exercícios estão trocando a resposta correta sozinho;
  46 + * Corrigir resolver avaliação a partir de tarefas pendentes;
  47 + * Toda vez que tento acessar a opção editar do usuário, visando fazer qualquer alteração,
  48 + inclusive até exclusão;
  49 + * Problema de navegabilidade no fórum;
  50 + * Problema na descrição dos botões enviar mensagem e cancelar do fórum;
  51 + * Invertida a ordem de paginação dos posts do fórum(da mais nova para mais velha agora);
  52 + * Problemas com envio de mensagens a partir de servidor de email que usam SSL;
  53 +
  54 +
  55 +Versão 0.93.30:
  56 +
  57 + * Resolvido o problema que estava permitindo o cadastramento de logins e emails repetidos.
  58 + * O Amadeus agora está configurado para a tabela de caracteres Unicode – UTF-8 que suporta
  59 + algo em torno de um milhão de caracteres.
  60 + * Amadeus está 70% pronto para internacionalização.
  61 + * Permitir a realização de avaliação pelo aluno apenas a partir da data de início da avaliação.
  62 + * É possível fazer a remoção de aluno
  63 +
  64 +
  65 +Versão 0.8.20:
  66 +
  67 + * Integração com o serviço de contas da Google (google acounts)
  68 + * Área de configuração de e-mail
  69 + * Área de configuração de cadastro de usuários
  70 + * Criação da área de administração de usuários
  71 + * Envio de e-mails de maneira direcionada, por parte do administrador
  72 + * Padronização de CSS
  73 + * Aumento da qualidade do código
  74 + * Primeira versão do Amadeus Mobile
  75 +
  76 +
  77 +Versão 0.6:
  78 +
  79 + * Melhoramento do código (remoção de código de negócio da interface)
  80 + * Otimização e modificação na estrutura do banco de dados
  81 + * Melhoramento do layout
  82 + * Remoção do css das páginas
  83 +
  84 +
  85 +Versão 0.5:
  86 +
  87 + * Melhoramento do código (remoção de código de negócio da interface)
  88 + * Otimização e modificação na estrutura do banco de dados
  89 +
  90 +
  91 +Versão 0.4:
  92 +
  93 + * Melhoramento do código (remoção de código de negócio da interface)
  94 + * Organização da exibição dos professores, monitores e alunos na tela de listar participantes do curso
  95 + * Melhoramento de layout na página de visualização do curso
  96 + * Otimização e modificação na estrutura do banco de dados
... ...
docs/changeLog.txt~ 0 → 100644
  1 +++ a/docs/changeLog.txt~
... ... @@ -0,0 +1,96 @@
  1 +
  2 +Amadeus Learning Management System ChangeLog
  3 +============================================
  4 +Versão 0.96.30
  5 +
  6 +
  7 + * Correção de 12 bugs do conhecidos do Sistema
  8 + * Criação de webservices para acesso da aplicação amadeus para Android
  9 + * Release do Amadeus Games.
  10 + * Criação de interfaces de visualização para os docentes.
  11 + * Atualização do perfil depois da conta criada. Não aceita a atualização.
  12 + * Não aceita posts no fórum com textos longos (mais de 256 caracteres). Aumentado para 9000.
  13 + * Não aceita nomes muito extensos de arquivos quando estão para serem colocados no ambiente (nomes com mais de 90 caracteres + sua extensão).
  14 + * Depois do curso criado, não aceita um novo professor para o curso, só aquele que o criou. Agora é possivel trocar o professor no meio da execução de um curso.
  15 + * Na criação dos módulos palavras acentuas ficam como caracteres especiais. Agora o Amadeus está todo em UFT8.
  16 + * Remoção dos WEB Services antigos SOAP que usavam a especificação JAXWS.
  17 + * Criação da funcionalidade de rodar Flash(SWF) no amadeus.
  18 + * Publicação do Amadeus para a plataforma Android.
  19 +
  20 +Versão 0.95.00
  21 +
  22 + * Gerenciador de cursos: nele é possivel listar e agrupar cursos. Facilita muito o traba-
  23 + lho do administrador de onde a instância do Amadeus está instalada.
  24 + * Replicação de cursos: agora é possível replicar seu curso/disciplina de forma automatica
  25 + a partir dessa nova feature do Amadeus.
  26 + * Manual de instalação para Windows.
  27 +
  28 +
  29 +Versão 0.93.90:
  30 +
  31 + * Corrigir a data de permisssão para o aluno responder as avaliações,pois independente da
  32 + data, termina expirando às 00:00h do dia anterior ao disponibilizado.
  33 + * Problema em editar Avaliação, a data de termino da avaliação fica setada fica com 00:00,
  34 + onde era para está 23:59.
  35 + * Duplicação de matricula de alunos.
  36 + * Corrigir a data de permissão para o aluno responder as avaliações.
  37 + * Duplicação de respostas de avaliação(alunos);
  38 + * Relação de usuários do sistema em Ordem alfabetica;
  39 + * Relação das notas do curso em Ordem alfabetica;
  40 + * Remover nome de adicionar Contato, na tela de perfil do usuário.
  41 + * Tratar o retorno para alunos que responderam a prova e que também expirou o prazo para
  42 + realização da mesma;
  43 + * Corrigir Atividade ao invés de Corrigir Prova, no botão de terminar a avaliação;
  44 + * Refatoração completa do modulo de avaliação(corrigido mais de 10 bugs);
  45 + * Os gabaritos dos exercícios estão trocando a resposta correta sozinho;
  46 + * Corrigir resolver avaliação a partir de tarefas pendentes;
  47 + * Toda vez que tento acessar a opção editar do usuário, visando fazer qualquer alteração,
  48 + inclusive até exclusão;
  49 + * Problema de navegabilidade no fórum;
  50 + * Problema na descrição dos botões enviar mensagem e cancelar do fórum;
  51 + * Invertida a ordem de paginação dos posts do fórum(da mais nova para mais velha agora);
  52 + * Problemas com envio de mensagens a partir de servidor de email que usam SSL;
  53 +
  54 +
  55 +Versão 0.93.30:
  56 +
  57 + * Resolvido o problema que estava permitindo o cadastramento de logins e emails repetidos.
  58 + * O Amadeus agora está configurado para a tabela de caracteres Unicode – UTF-8 que suporta
  59 + algo em torno de um milhão de caracteres.
  60 + * Amadeus está 70% pronto para internacionalização.
  61 + * Permitir a realização de avaliação pelo aluno apenas a partir da data de início da avaliação.
  62 + * É possível fazer a remoção de aluno
  63 +
  64 +
  65 +Versão 0.8.20:
  66 +
  67 + * Integração com o serviço de contas da Google (google acounts)
  68 + * Área de configuração de e-mail
  69 + * Área de configuração de cadastro de usuários
  70 + * Criação da área de administração de usuários
  71 + * Envio de e-mails de maneira direcionada, por parte do administrador
  72 + * Padronização de CSS
  73 + * Aumento da qualidade do código
  74 + * Primeira versão do Amadeus Mobile
  75 +
  76 +
  77 +Versão 0.6:
  78 +
  79 + * Melhoramento do código (remoção de código de negócio da interface)
  80 + * Otimização e modificação na estrutura do banco de dados
  81 + * Melhoramento do layout
  82 + * Remoção do css das páginas
  83 +
  84 +
  85 +Versão 0.5:
  86 +
  87 + * Melhoramento do código (remoção de código de negócio da interface)
  88 + * Otimização e modificação na estrutura do banco de dados
  89 +
  90 +
  91 +Versão 0.4:
  92 +
  93 + * Melhoramento do código (remoção de código de negócio da interface)
  94 + * Organização da exibição dos professores, monitores e alunos na tela de listar participantes do curso
  95 + * Melhoramento de layout na página de visualização do curso
  96 + * Otimização e modificação na estrutura do banco de dados
... ...
docs/guia_de_atualizacao_amadeus_v00.96.30.pdf 0 → 100644
No preview for this file type
docs/guia_de_instalacao_amadeus_v00.96.30.pdf 0 → 100644
No preview for this file type
docs/sourceCodeInstructions.txt 0 → 100644
  1 +++ a/docs/sourceCodeInstructions.txt
... ... @@ -0,0 +1,29 @@
  1 +Código-fonte
  2 +De Projeto Amadeus
  3 +Ir para: navegação, pesquisa
  4 +
  5 +O Projeto Amadeus dispõe de repositórios de código-fonte Subversion, onde o usuário pode efetuar o download do código do ponto em que está sendo modificado pela equipe de desenvolvedores. A seguir, mostramos os dados necessários para efetuar este download.
  6 +Para efetuar o download de todo o conteúdo do repositório (via linha de comando)
  7 +
  8 +svn co https://svn.softwarepublico.gov.br/svn/amadeus/ amadeuslms
  9 +
  10 +Para clientes gráficos, como o TortoiseSVN, basta colocar apenas a URL, que neste caso é https://svn.softwarepublico.gov.br/svn/amadeus.
  11 +
  12 +A partir desta URL pode-se observar a estrutura de subprojetos do AmadeusLMS. Esses projetos (amadeus_web, amadeus_tv, amadeus_games ...) representam, idividualmente, um projeto de software com histório no repositório. Cada um destes projetos obedece a seguinte estrutura de pastas:
  13 +
  14 +- trunk: linha principal de desenvolvimento
  15 +
  16 +- branches: linhas de desenvolvimento paralelas. Normalmente utilizadas para colaboradores externos ou mesmo para novos testes de funcionalidades ainda não completamente especificadas.
  17 +
  18 +- tags: local onde são guardados as versões fechadas de cada projeto (em código).
  19 +
  20 +
  21 +Para efetuar o download da linha principal de desenvolvimento (trunk)
  22 +
  23 +O principal projeto do AmadeusLMS (que funciona como núcleo integrador) é o projeto amadeus_web. Para acessar a principal linha de desenvolvimento do mesmo, basta acessar:
  24 +
  25 +svn co https://svn.softwarepublico.gov.br/svn/amadeus/amadeus_web/trunk amadeus-lms
  26 +
  27 +Submetendo contribuições para o código
  28 +
  29 +Para o envio de contribuições para o código, é necessário que você tenha uma conta no Portal do Software Público, seja cadastrado no projeto, e tenha as devidas permissões para realizar tal ação.
... ...
scripts/amadeus_upgrade_to_00.96.30.sql 0 → 100644
  1 +++ a/scripts/amadeus_upgrade_to_00.96.30.sql
... ... @@ -0,0 +1,19 @@
  1 +ALTER TABLE game ADD COLUMN linkexterno boolean DEFAULT false;
  2 +
  3 +CREATE TABLE log
  4 +(
  5 + id integer NOT NULL,
  6 + date timestamp without time zone,
  7 + person_id integer,
  8 + codigo integer,
  9 + idobjeto integer,
  10 + fases integer,
  11 + tempo integer,
  12 + pontuacao integer,
  13 + metaalternativa integer,
  14 + tamanhomensagem integer,
  15 + CONSTRAINT log_primary_key PRIMARY KEY (id ),
  16 + CONSTRAINT log_person_foreign_key FOREIGN KEY (person_id)
  17 + REFERENCES person (id) MATCH SIMPLE
  18 + ON UPDATE NO ACTION ON DELETE NO ACTION
  19 +);
... ...
scripts/amadeuslms_mobile-v00.96.30.sql 0 → 100644
  1 +++ a/scripts/amadeuslms_mobile-v00.96.30.sql
... ... @@ -0,0 +1,193 @@
  1 +--
  2 +-- PostgreSQL database dump
  3 +--
  4 +
  5 +SET client_encoding = 'UTF8';
  6 +SET standard_conforming_strings = off;
  7 +SET check_function_bodies = false;
  8 +SET client_min_messages = warning;
  9 +SET escape_string_warning = off;
  10 +
  11 +--
  12 +-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
  13 +--
  14 +
  15 +CREATE PROCEDURAL LANGUAGE plpgsql;
  16 +
  17 +
  18 +ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;
  19 +
  20 +SET search_path = public, pg_catalog;
  21 +
  22 +SET default_tablespace = '';
  23 +
  24 +SET default_with_oids = false;
  25 +
  26 +--
  27 +-- Name: course; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  28 +--
  29 +
  30 +CREATE TABLE course (
  31 + id integer NOT NULL,
  32 + color text,
  33 + sms boolean,
  34 + counter integer,
  35 + login text NOT NULL,
  36 + idcourse integer NOT NULL
  37 +);
  38 +
  39 +
  40 +ALTER TABLE public.course OWNER TO postgres;
  41 +
  42 +--
  43 +-- Name: login_notice; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  44 +--
  45 +
  46 +CREATE TABLE login_notice (
  47 + login text NOT NULL,
  48 + idnotice integer NOT NULL,
  49 + id_key bigint NOT NULL,
  50 + isread boolean NOT NULL
  51 +);
  52 +
  53 +
  54 +ALTER TABLE public.login_notice OWNER TO postgres;
  55 +
  56 +--
  57 +-- Name: login_numero; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  58 +--
  59 +
  60 +CREATE TABLE login_numero (
  61 + id integer NOT NULL,
  62 + login text NOT NULL,
  63 + numero_celular text
  64 +);
  65 +
  66 +
  67 +ALTER TABLE public.login_numero OWNER TO postgres;
  68 +
  69 +--
  70 +-- Name: notice; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  71 +--
  72 +
  73 +CREATE TABLE notice (
  74 + id integer NOT NULL,
  75 + title character varying NOT NULL,
  76 + content character varying NOT NULL,
  77 + idmodule integer NOT NULL,
  78 + idcourse integer NOT NULL,
  79 + type integer NOT NULL,
  80 + idelement integer NOT NULL,
  81 + date_creation date NOT NULL,
  82 + sent boolean
  83 +);
  84 +
  85 +
  86 +ALTER TABLE public.notice OWNER TO postgres;
  87 +
  88 +--
  89 +-- Name: sequence_notice; Type: SEQUENCE; Schema: public; Owner: postgres
  90 +--
  91 +
  92 +CREATE SEQUENCE sequence_notice
  93 + INCREMENT BY 1
  94 + MAXVALUE 10000
  95 + NO MINVALUE
  96 + CACHE 1;
  97 +
  98 +
  99 +ALTER TABLE public.sequence_notice OWNER TO postgres;
  100 +
  101 +--
  102 +-- Name: sequencia_curso; Type: SEQUENCE; Schema: public; Owner: postgres
  103 +--
  104 +
  105 +CREATE SEQUENCE sequencia_curso
  106 + INCREMENT BY 1
  107 + MAXVALUE 100000
  108 + NO MINVALUE
  109 + CACHE 1;
  110 +
  111 +
  112 +ALTER TABLE public.sequencia_curso OWNER TO postgres;
  113 +
  114 +--
  115 +-- Name: sequencia_login_notice; Type: SEQUENCE; Schema: public; Owner: postgres
  116 +--
  117 +
  118 +CREATE SEQUENCE sequencia_login_notice
  119 + INCREMENT BY 1
  120 + MAXVALUE 9999999999999999
  121 + NO MINVALUE
  122 + CACHE 1;
  123 +
  124 +
  125 +ALTER TABLE public.sequencia_login_notice OWNER TO postgres;
  126 +
  127 +--
  128 +-- Name: sequencia_login_numero; Type: SEQUENCE; Schema: public; Owner: postgres
  129 +--
  130 +
  131 +CREATE SEQUENCE sequencia_login_numero
  132 + INCREMENT BY 1
  133 + MAXVALUE 100000
  134 + NO MINVALUE
  135 + CACHE 1;
  136 +
  137 +
  138 +ALTER TABLE public.sequencia_login_numero OWNER TO postgres;
  139 +
  140 +--
  141 +-- Name: Notice_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  142 +--
  143 +
  144 +ALTER TABLE ONLY notice
  145 + ADD CONSTRAINT "Notice_pkey" PRIMARY KEY (id);
  146 +
  147 +
  148 +--
  149 +-- Name: course_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  150 +--
  151 +
  152 +ALTER TABLE ONLY course
  153 + ADD CONSTRAINT course_pkey PRIMARY KEY (id);
  154 +
  155 +
  156 +--
  157 +-- Name: login_notice_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  158 +--
  159 +
  160 +ALTER TABLE ONLY login_notice
  161 + ADD CONSTRAINT login_notice_pkey PRIMARY KEY (id_key);
  162 +
  163 +
  164 +--
  165 +-- Name: login_numero_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  166 +--
  167 +
  168 +ALTER TABLE ONLY login_numero
  169 + ADD CONSTRAINT login_numero_pkey PRIMARY KEY (id);
  170 +
  171 +
  172 +--
  173 +-- Name: login_notice_idnotice_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  174 +--
  175 +
  176 +ALTER TABLE ONLY login_notice
  177 + ADD CONSTRAINT login_notice_idnotice_fkey FOREIGN KEY (idnotice) REFERENCES notice(id);
  178 +
  179 +
  180 +--
  181 +-- Name: public; Type: ACL; Schema: -; Owner: postgres
  182 +--
  183 +
  184 +REVOKE ALL ON SCHEMA public FROM PUBLIC;
  185 +REVOKE ALL ON SCHEMA public FROM postgres;
  186 +GRANT ALL ON SCHEMA public TO postgres;
  187 +GRANT ALL ON SCHEMA public TO PUBLIC;
  188 +
  189 +
  190 +--
  191 +-- PostgreSQL database dump complete
  192 +--
  193 +
... ...
scripts/amadeuslms_web-v00.95.00.sql~ 0 → 100644
  1 +++ a/scripts/amadeuslms_web-v00.95.00.sql~
... ... @@ -0,0 +1,1697 @@
  1 +
  2 +--
  3 +-- PostgreSQL database dump
  4 +--
  5 +
  6 +SET client_encoding = 'UTF8';
  7 +SET standard_conforming_strings = off;
  8 +SET check_function_bodies = false;
  9 +SET client_min_messages = warning;
  10 +SET escape_string_warning = off;
  11 +
  12 +--
  13 +-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
  14 +--
  15 +
  16 +CREATE PROCEDURAL LANGUAGE plpgsql;
  17 +
  18 +
  19 +ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;
  20 +
  21 +SET search_path = public, pg_catalog;
  22 +
  23 +SET default_tablespace = '';
  24 +
  25 +SET default_with_oids = false;
  26 +
  27 +--
  28 +-- Name: accessinfo; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  29 +--
  30 +
  31 +CREATE TABLE accessinfo (
  32 + id integer NOT NULL,
  33 + login character varying(255),
  34 + password character varying(255),
  35 + profile_type integer NOT NULL
  36 +);
  37 +
  38 +
  39 +ALTER TABLE public.accessinfo OWNER TO postgres;
  40 +
  41 +--
  42 +-- Name: alternative; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  43 +--
  44 +
  45 +CREATE TABLE alternative (
  46 + id integer NOT NULL,
  47 + correct boolean NOT NULL,
  48 + description character varying(8000),
  49 + question_id integer
  50 +);
  51 +
  52 +
  53 +ALTER TABLE public.alternative OWNER TO postgres;
  54 +
  55 +--
  56 +-- Name: alternativerealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  57 +--
  58 +
  59 +CREATE TABLE alternativerealized (
  60 + id integer NOT NULL,
  61 + answer boolean NOT NULL,
  62 + alternative_id integer,
  63 + questionrealized_id integer NOT NULL
  64 +);
  65 +
  66 +
  67 +ALTER TABLE public.alternativerealized OWNER TO postgres;
  68 +
  69 +--
  70 +-- Name: answer; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  71 +--
  72 +
  73 +CREATE TABLE answer (
  74 + id integer NOT NULL,
  75 + answerdate timestamp without time zone,
  76 + person_id integer,
  77 + poll_id integer NOT NULL,
  78 + "position" integer
  79 +);
  80 +
  81 +
  82 +ALTER TABLE public.answer OWNER TO postgres;
  83 +
  84 +--
  85 +-- Name: archive; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  86 +--
  87 +
  88 +CREATE TABLE archive (
  89 + id integer NOT NULL,
  90 + archive bytea
  91 +);
  92 +
  93 +
  94 +ALTER TABLE public.archive OWNER TO postgres;
  95 +
  96 +--
  97 +-- Name: association; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  98 +--
  99 +
  100 +CREATE TABLE association (
  101 + questionassociation_id integer NOT NULL,
  102 + value character varying(255) NOT NULL,
  103 + _key character varying(255) NOT NULL
  104 +);
  105 +
  106 +
  107 +ALTER TABLE public.association OWNER TO postgres;
  108 +
  109 +--
  110 +-- Name: associationrealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  111 +--
  112 +
  113 +CREATE TABLE associationrealized (
  114 + questionrealized_id integer NOT NULL,
  115 + value character varying(255) NOT NULL,
  116 + _key character varying(255) NOT NULL
  117 +);
  118 +
  119 +
  120 +ALTER TABLE public.associationrealized OWNER TO postgres;
  121 +
  122 +--
  123 +-- Name: choice; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  124 +--
  125 +
  126 +CREATE TABLE choice (
  127 + id integer NOT NULL,
  128 + alternative character varying(255),
  129 + percentage double precision NOT NULL,
  130 + votes integer NOT NULL,
  131 + poll_id integer NOT NULL,
  132 + "position" integer
  133 +);
  134 +
  135 +
  136 +ALTER TABLE public.choice OWNER TO postgres;
  137 +
  138 +--
  139 +-- Name: commentary; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  140 +--
  141 +
  142 +CREATE TABLE commentary (
  143 + id integer NOT NULL,
  144 + description character varying(255)
  145 +);
  146 +
  147 +
  148 +ALTER TABLE public.commentary OWNER TO postgres;
  149 +
  150 +--
  151 +-- Name: course; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  152 +--
  153 +
  154 +CREATE TABLE course (
  155 + id integer NOT NULL,
  156 + content character varying(2000),
  157 + creationdate timestamp without time zone,
  158 + finalcoursedate timestamp without time zone,
  159 + finalregistrationdate timestamp without time zone,
  160 + initialcoursedate timestamp without time zone,
  161 + initialregistrationdate timestamp without time zone,
  162 + maxamountstudents integer NOT NULL,
  163 + name character varying(255),
  164 + objectives character varying(2000),
  165 + professor_id integer
  166 +);
  167 +
  168 +
  169 +ALTER TABLE public.course OWNER TO postgres;
  170 +
  171 +--
  172 +-- Name: course_coursescores; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  173 +--
  174 +
  175 +CREATE TABLE course_coursescores (
  176 + course_id integer NOT NULL,
  177 + studentsscores_id integer NOT NULL
  178 +);
  179 +
  180 +
  181 +ALTER TABLE public.course_coursescores OWNER TO postgres;
  182 +
  183 +--
  184 +-- Name: courseevaluation; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  185 +--
  186 +
  187 +CREATE TABLE courseevaluation (
  188 + id integer NOT NULL,
  189 + initdate timestamp without time zone
  190 +);
  191 +
  192 +
  193 +ALTER TABLE public.courseevaluation OWNER TO postgres;
  194 +
  195 +--
  196 +-- Name: courseevaluation_commentary; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  197 +--
  198 +
  199 +CREATE TABLE courseevaluation_commentary (
  200 + courseevaluation_id integer NOT NULL,
  201 + commentaries_id integer NOT NULL,
  202 + commentary_position integer NOT NULL
  203 +);
  204 +
  205 +
  206 +ALTER TABLE public.courseevaluation_commentary OWNER TO postgres;
  207 +
  208 +--
  209 +-- Name: courseevaluation_criterion; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  210 +--
  211 +
  212 +CREATE TABLE courseevaluation_criterion (
  213 + courseevaluation_id integer NOT NULL,
  214 + criteria_id integer NOT NULL,
  215 + criterion_position integer NOT NULL
  216 +);
  217 +
  218 +
  219 +ALTER TABLE public.courseevaluation_criterion OWNER TO postgres;
  220 +
  221 +--
  222 +-- Name: courseevaluation_person; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  223 +--
  224 +
  225 +CREATE TABLE courseevaluation_person (
  226 + courseevaluation_id integer NOT NULL,
  227 + students_id integer NOT NULL
  228 +);
  229 +
  230 +
  231 +ALTER TABLE public.courseevaluation_person OWNER TO postgres;
  232 +
  233 +--
  234 +-- Name: coursescores; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  235 +--
  236 +
  237 +CREATE TABLE coursescores (
  238 + id integer NOT NULL,
  239 + coursescore double precision NOT NULL,
  240 + student_id integer,
  241 + module_id integer NOT NULL
  242 +);
  243 +
  244 +
  245 +ALTER TABLE public.coursescores OWNER TO postgres;
  246 +
  247 +--
  248 +-- Name: criterion; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  249 +--
  250 +
  251 +CREATE TABLE criterion (
  252 + id integer NOT NULL,
  253 + ctype integer
  254 +);
  255 +
  256 +
  257 +ALTER TABLE public.criterion OWNER TO postgres;
  258 +
  259 +--
  260 +-- Name: criterion_criterionanswers; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  261 +--
  262 +
  263 +CREATE TABLE criterion_criterionanswers (
  264 + criterion_id integer NOT NULL,
  265 + answers_id integer NOT NULL
  266 +);
  267 +
  268 +
  269 +ALTER TABLE public.criterion_criterionanswers OWNER TO postgres;
  270 +
  271 +--
  272 +-- Name: criterionanswers; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  273 +--
  274 +
  275 +CREATE TABLE criterionanswers (
  276 + id integer NOT NULL,
  277 + aalmostalwaysvotes integer NOT NULL,
  278 + aalmostnevervotes integer NOT NULL,
  279 + afrequentlyvotes integer NOT NULL,
  280 + ararelyvotes integer NOT NULL,
  281 + asometimesvotes integer NOT NULL,
  282 + atotalvotes integer NOT NULL,
  283 + dalmostalwaysvotes integer NOT NULL,
  284 + dalmostnevervotes integer NOT NULL,
  285 + dfrequentlyvotes integer NOT NULL,
  286 + drarelyvotes integer NOT NULL,
  287 + dsometimesvotes integer NOT NULL,
  288 + dtotalvotes integer NOT NULL
  289 +);
  290 +
  291 +
  292 +ALTER TABLE public.criterionanswers OWNER TO postgres;
  293 +
  294 +--
  295 +-- Name: delivery; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  296 +--
  297 +
  298 +CREATE TABLE delivery (
  299 + id integer NOT NULL,
  300 + archive bytea,
  301 + date timestamp without time zone,
  302 + person_id integer,
  303 + homework_id integer
  304 +);
  305 +
  306 +
  307 +ALTER TABLE public.delivery OWNER TO postgres;
  308 +
  309 +--
  310 +-- Name: evaluation; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  311 +--
  312 +
  313 +CREATE TABLE evaluation (
  314 + id integer NOT NULL,
  315 + afterdeadlineachieved boolean NOT NULL,
  316 + description character varying(8000),
  317 + finish timestamp without time zone,
  318 + start timestamp without time zone,
  319 + module_id integer
  320 +);
  321 +
  322 +
  323 +ALTER TABLE public.evaluation OWNER TO postgres;
  324 +
  325 +--
  326 +-- Name: evaluation_question; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  327 +--
  328 +
  329 +CREATE TABLE evaluation_question (
  330 + evaluation_id integer NOT NULL,
  331 + question_id integer NOT NULL
  332 +);
  333 +
  334 +
  335 +ALTER TABLE public.evaluation_question OWNER TO postgres;
  336 +
  337 +--
  338 +-- Name: evaluationrealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  339 +--
  340 +
  341 +CREATE TABLE evaluationrealized (
  342 + id integer NOT NULL,
  343 + correcteddate timestamp without time zone,
  344 + grade real NOT NULL,
  345 + realizeddate timestamp without time zone,
  346 + person_id integer,
  347 + evaluation_id integer NOT NULL
  348 +);
  349 +
  350 +
  351 +ALTER TABLE public.evaluationrealized OWNER TO postgres;
  352 +
  353 +--
  354 +-- Name: externallink; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  355 +--
  356 +
  357 +CREATE TABLE externallink (
  358 + id integer NOT NULL,
  359 + creationdate date,
  360 + description character varying(1000),
  361 + name character varying(255),
  362 + url character varying(500),
  363 + module_id integer NOT NULL
  364 +);
  365 +
  366 +
  367 +ALTER TABLE public.externallink OWNER TO postgres;
  368 +
  369 +--
  370 +-- Name: forum; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  371 +--
  372 +
  373 +CREATE TABLE forum (
  374 + id integer NOT NULL,
  375 + description character varying(255),
  376 + creationdate timestamp without time zone,
  377 + name character varying(255),
  378 + module_id integer NOT NULL
  379 +);
  380 +
  381 +
  382 +ALTER TABLE public.forum OWNER TO postgres;
  383 +
  384 +--
  385 +-- Name: game; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  386 +--
  387 +
  388 +CREATE TABLE game (
  389 + id integer NOT NULL,
  390 + creationdate timestamp without time zone,
  391 + description character varying(255),
  392 + image bytea,
  393 + maxusers integer NOT NULL,
  394 + minusers integer NOT NULL,
  395 + name character varying(255),
  396 + url character varying(255),
  397 + module_id integer NOT NULL,
  398 + linkexterno BOOLEAN DEFAULT FALSE
  399 +);
  400 +
  401 +
  402 +ALTER TABLE public.game OWNER TO postgres;
  403 +
  404 +--
  405 +-- Name: gapanswer; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  406 +--
  407 +
  408 +CREATE TABLE gapanswer (
  409 + questionrealized_id integer NOT NULL,
  410 + answer character varying(255) NOT NULL
  411 +);
  412 +
  413 +
  414 +ALTER TABLE public.gapanswer OWNER TO postgres;
  415 +
  416 +--
  417 +-- Name: hibernate_sequence; Type: SEQUENCE; Schema: public; Owner: postgres
  418 +--
  419 +
  420 +CREATE SEQUENCE hibernate_sequence
  421 + INCREMENT BY 1
  422 + NO MAXVALUE
  423 + NO MINVALUE
  424 + CACHE 1;
  425 +
  426 +
  427 +ALTER TABLE public.hibernate_sequence OWNER TO postgres;
  428 +
  429 +--
  430 +-- Name: historylearningobject; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  431 +--
  432 +
  433 +CREATE TABLE historylearningobject (
  434 + id integer NOT NULL,
  435 + dateaccess timestamp without time zone,
  436 + dateendaccess timestamp without time zone,
  437 + score character varying(255),
  438 + timeaccess time without time zone,
  439 + learning_object_id integer NOT NULL,
  440 + person_id integer NOT NULL
  441 +);
  442 +
  443 +
  444 +ALTER TABLE public.historylearningobject OWNER TO postgres;
  445 +
  446 +--
  447 +-- Name: homework; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  448 +--
  449 +
  450 +CREATE TABLE homework (
  451 + id integer NOT NULL,
  452 + allowpostponing timestamp without time zone,
  453 + deadline timestamp without time zone,
  454 + description character varying(255),
  455 + initdate timestamp without time zone,
  456 + name character varying(255),
  457 + module_id integer NOT NULL
  458 +);
  459 +
  460 +
  461 +ALTER TABLE public.homework OWNER TO postgres;
  462 +
  463 +--
  464 +-- Name: image; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  465 +--
  466 +
  467 +CREATE TABLE image (
  468 + id integer NOT NULL,
  469 + photo bytea
  470 +);
  471 +
  472 +
  473 +ALTER TABLE public.image OWNER TO postgres;
  474 +
  475 +--
  476 +-- Name: keyword; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  477 +--
  478 +
  479 +CREATE TABLE keyword (
  480 + id integer NOT NULL,
  481 + name character varying(255),
  482 + popularity integer NOT NULL
  483 +);
  484 +
  485 +
  486 +ALTER TABLE public.keyword OWNER TO postgres;
  487 +
  488 +--
  489 +-- Name: keywordsofcourse; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  490 +--
  491 +
  492 +CREATE TABLE keywordsofcourse (
  493 + course_id integer NOT NULL,
  494 + keywords_id integer NOT NULL
  495 +);
  496 +
  497 +
  498 +ALTER TABLE public.keywordsofcourse OWNER TO postgres;
  499 +
  500 +--
  501 +-- Name: learningobject; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  502 +--
  503 +
  504 +CREATE TABLE learningobject (
  505 + id integer NOT NULL,
  506 + creationdate timestamp without time zone,
  507 + description character varying(255),
  508 + name character varying(255),
  509 + url character varying(255),
  510 + module_id integer NOT NULL
  511 +);
  512 +
  513 +
  514 +ALTER TABLE public.learningobject OWNER TO postgres;
  515 +
  516 +--
  517 +-- Name: material; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  518 +--
  519 +
  520 +CREATE TABLE material (
  521 + id integer NOT NULL,
  522 + allowlatedeliveries boolean NOT NULL,
  523 + archivename character varying(255),
  524 + correcteddate timestamp without time zone,
  525 + extension character varying(255),
  526 + grade real,
  527 + creationdate timestamp without time zone,
  528 + author_id integer,
  529 + archive_id integer NOT NULL,
  530 + module_id integer NOT NULL,
  531 + request_id integer
  532 +);
  533 +
  534 +
  535 +ALTER TABLE public.material OWNER TO postgres;
  536 +
  537 +--
  538 +-- Name: materialrequest; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  539 +--
  540 +
  541 +CREATE TABLE materialrequest (
  542 + id integer NOT NULL,
  543 + allowlatedeliveries boolean NOT NULL,
  544 + deliverydate timestamp without time zone,
  545 + description character varying(255),
  546 + name character varying(255),
  547 + module_id integer NOT NULL,
  548 + creationdate timestamp without time zone
  549 +);
  550 +
  551 +
  552 +ALTER TABLE public.materialrequest OWNER TO postgres;
  553 +
  554 +--
  555 +-- Name: message; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  556 +--
  557 +
  558 +CREATE TABLE message (
  559 + id integer NOT NULL,
  560 + body character varying(2000),
  561 + date timestamp without time zone,
  562 + forum_id integer NOT NULL,
  563 + author_id integer,
  564 + "position" integer
  565 +);
  566 +
  567 +
  568 +ALTER TABLE public.message OWNER TO postgres;
  569 +
  570 +--
  571 +-- Name: module; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  572 +--
  573 +
  574 +CREATE TABLE module (
  575 + id integer NOT NULL,
  576 + description character varying(1500),
  577 + name character varying(255),
  578 + "position" integer NOT NULL,
  579 + visible boolean NOT NULL,
  580 + course_id integer NOT NULL
  581 +);
  582 +
  583 +
  584 +ALTER TABLE public.module OWNER TO postgres;
  585 +
  586 +--
  587 +-- Name: openid; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  588 +--
  589 +
  590 +CREATE TABLE openid (
  591 + id integer NOT NULL,
  592 + email character varying(255),
  593 + _identity character varying(255),
  594 + name character varying(255),
  595 + provideby character varying(255),
  596 + accessinfo_id integer NOT NULL
  597 +);
  598 +
  599 +
  600 +ALTER TABLE public.openid OWNER TO postgres;
  601 +
  602 +--
  603 +-- Name: person; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  604 +--
  605 +
  606 +CREATE TABLE person (
  607 + id integer NOT NULL,
  608 + birthdate timestamp without time zone,
  609 + city character varying(255),
  610 + cpf character varying(255),
  611 + email character varying(255),
  612 + gender character(1) NOT NULL,
  613 + name character varying(255),
  614 + phonenumber character varying(255),
  615 + state character varying(255),
  616 + access_info_id integer,
  617 + image_id integer,
  618 + resume_id integer
  619 +);
  620 +
  621 +
  622 +ALTER TABLE public.person OWNER TO postgres;
  623 +
  624 +--
  625 +-- Name: person_role_course; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  626 +--
  627 +
  628 +CREATE TABLE person_role_course (
  629 + id integer NOT NULL,
  630 + person_id integer,
  631 + course_id integer NOT NULL,
  632 + role_id integer
  633 +);
  634 +
  635 +
  636 +ALTER TABLE public.person_role_course OWNER TO postgres;
  637 +
  638 +--
  639 +-- Name: poll; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  640 +--
  641 +
  642 +CREATE TABLE poll (
  643 + id integer NOT NULL,
  644 + finishdate timestamp without time zone,
  645 + creationdate timestamp without time zone,
  646 + name character varying(255),
  647 + question character varying(255),
  648 + module_id integer NOT NULL
  649 +);
  650 +
  651 +
  652 +ALTER TABLE public.poll OWNER TO postgres;
  653 +
  654 +--
  655 +-- Name: question; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  656 +--
  657 +
  658 +CREATE TABLE question (
  659 + dtype character varying(31) NOT NULL,
  660 + id integer NOT NULL,
  661 + description character varying(8000),
  662 + course_id integer NOT NULL
  663 +);
  664 +
  665 +
  666 +ALTER TABLE public.question OWNER TO postgres;
  667 +
  668 +--
  669 +-- Name: questionrealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  670 +--
  671 +
  672 +CREATE TABLE questionrealized (
  673 + dtype character varying(31) NOT NULL,
  674 + id integer NOT NULL,
  675 + comment character varying(8000),
  676 + grade real NOT NULL,
  677 + answer character varying(8000),
  678 + question_id integer,
  679 + evaluationrealized_id integer NOT NULL
  680 +);
  681 +
  682 +
  683 +ALTER TABLE public.questionrealized OWNER TO postgres;
  684 +
  685 +--
  686 +-- Name: resume; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  687 +--
  688 +
  689 +CREATE TABLE resume (
  690 + id integer NOT NULL,
  691 + degree character varying(255),
  692 + description character varying(255),
  693 + instituition character varying(255),
  694 + year integer
  695 +);
  696 +
  697 +
  698 +ALTER TABLE public.resume OWNER TO postgres;
  699 +
  700 +--
  701 +-- Name: role; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  702 +--
  703 +
  704 +CREATE TABLE role (
  705 + id integer NOT NULL,
  706 + role_type integer NOT NULL
  707 +);
  708 +
  709 +
  710 +ALTER TABLE public.role OWNER TO postgres;
  711 +
  712 +--
  713 +-- Name: userrequest; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  714 +--
  715 +
  716 +CREATE TABLE userrequest (
  717 + id integer NOT NULL,
  718 + interest character varying(255),
  719 + status_type integer NOT NULL,
  720 + teachingrequest boolean NOT NULL,
  721 + userrequestdate timestamp without time zone,
  722 + course_id integer,
  723 + person_id integer
  724 +);
  725 +
  726 +
  727 +ALTER TABLE public.userrequest OWNER TO postgres;
  728 +
  729 +--
  730 +-- Name: videoiriz; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  731 +--
  732 +
  733 +CREATE TABLE videoiriz (
  734 + id integer NOT NULL,
  735 + description character varying(255),
  736 + name character varying(255),
  737 + uploaded boolean NOT NULL,
  738 + youtubeid character varying(255),
  739 + module_id integer NOT NULL,
  740 + creationdate timestamp without time zone
  741 +);
  742 +
  743 +CREATE TABLE log
  744 +(
  745 + id integer NOT NULL,
  746 + date timestamp without time zone,
  747 + person_id integer,
  748 + codigo integer,
  749 + idobjeto integer,
  750 + fases integer,
  751 + tempo integer,
  752 + pontuacao integer,
  753 + metaalternativa integer,
  754 + tamanhomensagem integer,
  755 + CONSTRAINT log_primary_key PRIMARY KEY (id ),
  756 + CONSTRAINT log_person_foreign_key FOREIGN KEY (person_id)
  757 + REFERENCES person (id) MATCH SIMPLE
  758 + ON UPDATE NO ACTION ON DELETE NO ACTION
  759 +);
  760 +
  761 +
  762 +
  763 +ALTER TABLE public.videoiriz OWNER TO postgres;
  764 +
  765 +--
  766 +-- Name: accessinfo_login_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  767 +--
  768 +
  769 +ALTER TABLE ONLY accessinfo
  770 + ADD CONSTRAINT accessinfo_login_key UNIQUE (login);
  771 +
  772 +
  773 +--
  774 +-- Name: accessinfo_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  775 +--
  776 +
  777 +ALTER TABLE ONLY accessinfo
  778 + ADD CONSTRAINT accessinfo_pkey PRIMARY KEY (id);
  779 +
  780 +
  781 +--
  782 +-- Name: alternative_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  783 +--
  784 +
  785 +ALTER TABLE ONLY alternative
  786 + ADD CONSTRAINT alternative_pkey PRIMARY KEY (id);
  787 +
  788 +
  789 +--
  790 +-- Name: alternativerealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  791 +--
  792 +
  793 +ALTER TABLE ONLY alternativerealized
  794 + ADD CONSTRAINT alternativerealized_pkey PRIMARY KEY (id);
  795 +
  796 +
  797 +--
  798 +-- Name: answer_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  799 +--
  800 +
  801 +ALTER TABLE ONLY answer
  802 + ADD CONSTRAINT answer_pkey PRIMARY KEY (id);
  803 +
  804 +
  805 +--
  806 +-- Name: archive_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  807 +--
  808 +
  809 +ALTER TABLE ONLY archive
  810 + ADD CONSTRAINT archive_pkey PRIMARY KEY (id);
  811 +
  812 +
  813 +--
  814 +-- Name: association_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  815 +--
  816 +
  817 +ALTER TABLE ONLY association
  818 + ADD CONSTRAINT association_pkey PRIMARY KEY (questionassociation_id, _key);
  819 +
  820 +
  821 +--
  822 +-- Name: associationrealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  823 +--
  824 +
  825 +ALTER TABLE ONLY associationrealized
  826 + ADD CONSTRAINT associationrealized_pkey PRIMARY KEY (questionrealized_id, _key);
  827 +
  828 +
  829 +--
  830 +-- Name: choice_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  831 +--
  832 +
  833 +ALTER TABLE ONLY choice
  834 + ADD CONSTRAINT choice_pkey PRIMARY KEY (id);
  835 +
  836 +
  837 +--
  838 +-- Name: commentary_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  839 +--
  840 +
  841 +ALTER TABLE ONLY commentary
  842 + ADD CONSTRAINT commentary_pkey PRIMARY KEY (id);
  843 +
  844 +
  845 +--
  846 +-- Name: course_coursescores_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  847 +--
  848 +
  849 +ALTER TABLE ONLY course_coursescores
  850 + ADD CONSTRAINT course_coursescores_pkey PRIMARY KEY (course_id, studentsscores_id);
  851 +
  852 +
  853 +--
  854 +-- Name: course_coursescores_studentsscores_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  855 +--
  856 +
  857 +ALTER TABLE ONLY course_coursescores
  858 + ADD CONSTRAINT course_coursescores_studentsscores_id_key UNIQUE (studentsscores_id);
  859 +
  860 +
  861 +--
  862 +-- Name: course_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  863 +--
  864 +
  865 +ALTER TABLE ONLY course
  866 + ADD CONSTRAINT course_pkey PRIMARY KEY (id);
  867 +
  868 +
  869 +--
  870 +-- Name: courseevaluation_commentary_commentaries_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  871 +--
  872 +
  873 +ALTER TABLE ONLY courseevaluation_commentary
  874 + ADD CONSTRAINT courseevaluation_commentary_commentaries_id_key UNIQUE (commentaries_id);
  875 +
  876 +
  877 +--
  878 +-- Name: courseevaluation_commentary_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  879 +--
  880 +
  881 +ALTER TABLE ONLY courseevaluation_commentary
  882 + ADD CONSTRAINT courseevaluation_commentary_pkey PRIMARY KEY (courseevaluation_id, commentary_position);
  883 +
  884 +
  885 +--
  886 +-- Name: courseevaluation_criterion_criteria_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  887 +--
  888 +
  889 +ALTER TABLE ONLY courseevaluation_criterion
  890 + ADD CONSTRAINT courseevaluation_criterion_criteria_id_key UNIQUE (criteria_id);
  891 +
  892 +
  893 +--
  894 +-- Name: courseevaluation_criterion_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  895 +--
  896 +
  897 +ALTER TABLE ONLY courseevaluation_criterion
  898 + ADD CONSTRAINT courseevaluation_criterion_pkey PRIMARY KEY (courseevaluation_id, criterion_position);
  899 +
  900 +
  901 +--
  902 +-- Name: courseevaluation_person_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  903 +--
  904 +
  905 +ALTER TABLE ONLY courseevaluation_person
  906 + ADD CONSTRAINT courseevaluation_person_pkey PRIMARY KEY (courseevaluation_id, students_id);
  907 +
  908 +
  909 +--
  910 +-- Name: courseevaluation_person_students_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  911 +--
  912 +
  913 +ALTER TABLE ONLY courseevaluation_person
  914 + ADD CONSTRAINT courseevaluation_person_students_id_key UNIQUE (students_id);
  915 +
  916 +
  917 +--
  918 +-- Name: courseevaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  919 +--
  920 +
  921 +ALTER TABLE ONLY courseevaluation
  922 + ADD CONSTRAINT courseevaluation_pkey PRIMARY KEY (id);
  923 +
  924 +
  925 +--
  926 +-- Name: coursescores_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  927 +--
  928 +
  929 +ALTER TABLE ONLY coursescores
  930 + ADD CONSTRAINT coursescores_pkey PRIMARY KEY (id);
  931 +
  932 +
  933 +--
  934 +-- Name: criterion_criterionanswers_answers_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  935 +--
  936 +
  937 +ALTER TABLE ONLY criterion_criterionanswers
  938 + ADD CONSTRAINT criterion_criterionanswers_answers_id_key UNIQUE (answers_id);
  939 +
  940 +
  941 +--
  942 +-- Name: criterion_criterionanswers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  943 +--
  944 +
  945 +ALTER TABLE ONLY criterion_criterionanswers
  946 + ADD CONSTRAINT criterion_criterionanswers_pkey PRIMARY KEY (criterion_id, answers_id);
  947 +
  948 +
  949 +--
  950 +-- Name: criterion_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  951 +--
  952 +
  953 +ALTER TABLE ONLY criterion
  954 + ADD CONSTRAINT criterion_pkey PRIMARY KEY (id);
  955 +
  956 +
  957 +--
  958 +-- Name: criterionanswers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  959 +--
  960 +
  961 +ALTER TABLE ONLY criterionanswers
  962 + ADD CONSTRAINT criterionanswers_pkey PRIMARY KEY (id);
  963 +
  964 +
  965 +--
  966 +-- Name: delivery_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  967 +--
  968 +
  969 +ALTER TABLE ONLY delivery
  970 + ADD CONSTRAINT delivery_pkey PRIMARY KEY (id);
  971 +
  972 +
  973 +--
  974 +-- Name: evaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  975 +--
  976 +
  977 +ALTER TABLE ONLY evaluation
  978 + ADD CONSTRAINT evaluation_pkey PRIMARY KEY (id);
  979 +
  980 +
  981 +--
  982 +-- Name: evaluationrealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  983 +--
  984 +
  985 +ALTER TABLE ONLY evaluationrealized
  986 + ADD CONSTRAINT evaluationrealized_pkey PRIMARY KEY (id);
  987 +
  988 +
  989 +--
  990 +-- Name: externallink_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  991 +--
  992 +
  993 +ALTER TABLE ONLY externallink
  994 + ADD CONSTRAINT externallink_pkey PRIMARY KEY (id);
  995 +
  996 +
  997 +--
  998 +-- Name: forum_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  999 +--
  1000 +
  1001 +ALTER TABLE ONLY forum
  1002 + ADD CONSTRAINT forum_pkey PRIMARY KEY (id);
  1003 +
  1004 +
  1005 +--
  1006 +-- Name: game_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1007 +--
  1008 +
  1009 +ALTER TABLE ONLY game
  1010 + ADD CONSTRAINT game_pkey PRIMARY KEY (id);
  1011 +
  1012 +
  1013 +--
  1014 +-- Name: historylearningobject_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1015 +--
  1016 +
  1017 +ALTER TABLE ONLY historylearningobject
  1018 + ADD CONSTRAINT historylearningobject_pkey PRIMARY KEY (id);
  1019 +
  1020 +
  1021 +--
  1022 +-- Name: homework_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1023 +--
  1024 +
  1025 +ALTER TABLE ONLY homework
  1026 + ADD CONSTRAINT homework_pkey PRIMARY KEY (id);
  1027 +
  1028 +
  1029 +--
  1030 +-- Name: image_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1031 +--
  1032 +
  1033 +ALTER TABLE ONLY image
  1034 + ADD CONSTRAINT image_pkey PRIMARY KEY (id);
  1035 +
  1036 +
  1037 +--
  1038 +-- Name: keyword_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1039 +--
  1040 +
  1041 +ALTER TABLE ONLY keyword
  1042 + ADD CONSTRAINT keyword_name_key UNIQUE (name);
  1043 +
  1044 +
  1045 +--
  1046 +-- Name: keyword_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1047 +--
  1048 +
  1049 +ALTER TABLE ONLY keyword
  1050 + ADD CONSTRAINT keyword_pkey PRIMARY KEY (id);
  1051 +
  1052 +
  1053 +--
  1054 +-- Name: keywordsofcourse_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1055 +--
  1056 +
  1057 +ALTER TABLE ONLY keywordsofcourse
  1058 + ADD CONSTRAINT keywordsofcourse_pkey PRIMARY KEY (course_id, keywords_id);
  1059 +
  1060 +
  1061 +--
  1062 +-- Name: learningobject_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1063 +--
  1064 +
  1065 +ALTER TABLE ONLY learningobject
  1066 + ADD CONSTRAINT learningobject_pkey PRIMARY KEY (id);
  1067 +
  1068 +
  1069 +--
  1070 +-- Name: material_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1071 +--
  1072 +
  1073 +ALTER TABLE ONLY material
  1074 + ADD CONSTRAINT material_pkey PRIMARY KEY (id);
  1075 +
  1076 +
  1077 +--
  1078 +-- Name: materialrequest_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1079 +--
  1080 +
  1081 +ALTER TABLE ONLY materialrequest
  1082 + ADD CONSTRAINT materialrequest_pkey PRIMARY KEY (id);
  1083 +
  1084 +
  1085 +--
  1086 +-- Name: message_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1087 +--
  1088 +
  1089 +ALTER TABLE ONLY message
  1090 + ADD CONSTRAINT message_pkey PRIMARY KEY (id);
  1091 +
  1092 +
  1093 +--
  1094 +-- Name: module_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1095 +--
  1096 +
  1097 +ALTER TABLE ONLY module
  1098 + ADD CONSTRAINT module_pkey PRIMARY KEY (id);
  1099 +
  1100 +
  1101 +--
  1102 +-- Name: openid_identity_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1103 +--
  1104 +
  1105 +ALTER TABLE ONLY openid
  1106 + ADD CONSTRAINT openid_identity_key UNIQUE (_identity);
  1107 +
  1108 +
  1109 +--
  1110 +-- Name: openid_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1111 +--
  1112 +
  1113 +ALTER TABLE ONLY openid
  1114 + ADD CONSTRAINT openid_pkey PRIMARY KEY (id);
  1115 +
  1116 +
  1117 +--
  1118 +-- Name: person_email_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1119 +--
  1120 +
  1121 +ALTER TABLE ONLY person
  1122 + ADD CONSTRAINT person_email_key UNIQUE (email);
  1123 +
  1124 +
  1125 +--
  1126 +-- Name: person_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1127 +--
  1128 +
  1129 +ALTER TABLE ONLY person
  1130 + ADD CONSTRAINT person_pkey PRIMARY KEY (id);
  1131 +
  1132 +
  1133 +--
  1134 +-- Name: person_role_course_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1135 +--
  1136 +
  1137 +ALTER TABLE ONLY person_role_course
  1138 + ADD CONSTRAINT person_role_course_pkey PRIMARY KEY (id);
  1139 +
  1140 +
  1141 +--
  1142 +-- Name: poll_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1143 +--
  1144 +
  1145 +ALTER TABLE ONLY poll
  1146 + ADD CONSTRAINT poll_pkey PRIMARY KEY (id);
  1147 +
  1148 +
  1149 +--
  1150 +-- Name: primarykeyconstraint; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1151 +--
  1152 +
  1153 +ALTER TABLE ONLY evaluation_question
  1154 + ADD CONSTRAINT primarykeyconstraint PRIMARY KEY (evaluation_id, question_id);
  1155 +
  1156 +
  1157 +--
  1158 +-- Name: question_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1159 +--
  1160 +
  1161 +ALTER TABLE ONLY question
  1162 + ADD CONSTRAINT question_pkey PRIMARY KEY (id);
  1163 +
  1164 +
  1165 +--
  1166 +-- Name: questionrealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1167 +--
  1168 +
  1169 +ALTER TABLE ONLY questionrealized
  1170 + ADD CONSTRAINT questionrealized_pkey PRIMARY KEY (id);
  1171 +
  1172 +
  1173 +--
  1174 +-- Name: resume_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1175 +--
  1176 +
  1177 +ALTER TABLE ONLY resume
  1178 + ADD CONSTRAINT resume_pkey PRIMARY KEY (id);
  1179 +
  1180 +
  1181 +--
  1182 +-- Name: role_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1183 +--
  1184 +
  1185 +ALTER TABLE ONLY role
  1186 + ADD CONSTRAINT role_pkey PRIMARY KEY (id);
  1187 +
  1188 +
  1189 +--
  1190 +-- Name: uniquekey_person_course; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1191 +--
  1192 +
  1193 +ALTER TABLE ONLY person_role_course
  1194 + ADD CONSTRAINT uniquekey_person_course UNIQUE (person_id, course_id);
  1195 +
  1196 +
  1197 +--
  1198 +-- Name: uniquekey_person_evaluation; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1199 +--
  1200 +
  1201 +ALTER TABLE ONLY evaluationrealized
  1202 + ADD CONSTRAINT uniquekey_person_evaluation UNIQUE (person_id, evaluation_id);
  1203 +
  1204 +
  1205 +--
  1206 +-- Name: userrequest_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1207 +--
  1208 +
  1209 +ALTER TABLE ONLY userrequest
  1210 + ADD CONSTRAINT userrequest_pkey PRIMARY KEY (id);
  1211 +
  1212 +
  1213 +--
  1214 +-- Name: videoiriz_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1215 +--
  1216 +
  1217 +ALTER TABLE ONLY videoiriz
  1218 + ADD CONSTRAINT videoiriz_pkey PRIMARY KEY (id);
  1219 +
  1220 +
  1221 +--
  1222 +-- Name: fk1535e21440c3070c; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1223 +--
  1224 +
  1225 +ALTER TABLE ONLY gapanswer
  1226 + ADD CONSTRAINT fk1535e21440c3070c FOREIGN KEY (questionrealized_id) REFERENCES questionrealized(id);
  1227 +
  1228 +
  1229 +--
  1230 +-- Name: fk15adc9475d0e3509; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1231 +--
  1232 +
  1233 +ALTER TABLE ONLY material
  1234 + ADD CONSTRAINT fk15adc9475d0e3509 FOREIGN KEY (request_id) REFERENCES materialrequest(id);
  1235 +
  1236 +
  1237 +--
  1238 +-- Name: fk15adc947a6287150; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1239 +--
  1240 +
  1241 +ALTER TABLE ONLY material
  1242 + ADD CONSTRAINT fk15adc947a6287150 FOREIGN KEY (archive_id) REFERENCES archive(id);
  1243 +
  1244 +
  1245 +--
  1246 +-- Name: fk15adc947a7537834; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1247 +--
  1248 +
  1249 +ALTER TABLE ONLY material
  1250 + ADD CONSTRAINT fk15adc947a7537834 FOREIGN KEY (author_id) REFERENCES person(id);
  1251 +
  1252 +
  1253 +--
  1254 +-- Name: fk15adc947ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1255 +--
  1256 +
  1257 +ALTER TABLE ONLY material
  1258 + ADD CONSTRAINT fk15adc947ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1259 +
  1260 +
  1261 +--
  1262 +-- Name: fk1c3e4b288ea5370; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1263 +--
  1264 +
  1265 +ALTER TABLE ONLY criterion_criterionanswers
  1266 + ADD CONSTRAINT fk1c3e4b288ea5370 FOREIGN KEY (criterion_id) REFERENCES criterion(id);
  1267 +
  1268 +
  1269 +--
  1270 +-- Name: fk1c3e4b2c49525a3; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1271 +--
  1272 +
  1273 +ALTER TABLE ONLY criterion_criterionanswers
  1274 + ADD CONSTRAINT fk1c3e4b2c49525a3 FOREIGN KEY (answers_id) REFERENCES criterionanswers(id);
  1275 +
  1276 +
  1277 +--
  1278 +-- Name: fk21c012ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1279 +--
  1280 +
  1281 +ALTER TABLE ONLY game
  1282 + ADD CONSTRAINT fk21c012ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1283 +
  1284 +
  1285 +--
  1286 +-- Name: fk24a217aa39b57ec2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1287 +--
  1288 +
  1289 +ALTER TABLE ONLY evaluationrealized
  1290 + ADD CONSTRAINT fk24a217aa39b57ec2 FOREIGN KEY (evaluation_id) REFERENCES evaluation(id);
  1291 +
  1292 +
  1293 +--
  1294 +-- Name: fk24a217aa823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1295 +--
  1296 +
  1297 +ALTER TABLE ONLY evaluationrealized
  1298 + ADD CONSTRAINT fk24a217aa823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1299 +
  1300 +
  1301 +--
  1302 +-- Name: fk260bdfff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1303 +--
  1304 +
  1305 +ALTER TABLE ONLY poll
  1306 + ADD CONSTRAINT fk260bdfff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1307 +
  1308 +
  1309 +--
  1310 +-- Name: fk33e78f316c6b0f66; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1311 +--
  1312 +
  1313 +ALTER TABLE ONLY courseevaluation_commentary
  1314 + ADD CONSTRAINT fk33e78f316c6b0f66 FOREIGN KEY (commentaries_id) REFERENCES commentary(id);
  1315 +
  1316 +
  1317 +--
  1318 +-- Name: fk33e78f31ed65d464; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1319 +--
  1320 +
  1321 +ALTER TABLE ONLY courseevaluation_commentary
  1322 + ADD CONSTRAINT fk33e78f31ed65d464 FOREIGN KEY (courseevaluation_id) REFERENCES courseevaluation(id);
  1323 +
  1324 +
  1325 +--
  1326 +-- Name: fk34ef8014823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1327 +--
  1328 +
  1329 +ALTER TABLE ONLY delivery
  1330 + ADD CONSTRAINT fk34ef8014823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1331 +
  1332 +
  1333 +--
  1334 +-- Name: fk34ef8014a16e7a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1335 +--
  1336 +
  1337 +ALTER TABLE ONLY delivery
  1338 + ADD CONSTRAINT fk34ef8014a16e7a4 FOREIGN KEY (homework_id) REFERENCES homework(id);
  1339 +
  1340 +
  1341 +--
  1342 +-- Name: fk40e9d01ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1343 +--
  1344 +
  1345 +ALTER TABLE ONLY forum
  1346 + ADD CONSTRAINT fk40e9d01ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1347 +
  1348 +
  1349 +--
  1350 +-- Name: fk53fbe3afc72997b7; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1351 +--
  1352 +
  1353 +ALTER TABLE ONLY associationrealized
  1354 + ADD CONSTRAINT fk53fbe3afc72997b7 FOREIGN KEY (questionrealized_id) REFERENCES questionrealized(id);
  1355 +
  1356 +
  1357 +--
  1358 +-- Name: fk56da32dddbc23d07; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1359 +--
  1360 +
  1361 +ALTER TABLE ONLY courseevaluation_person
  1362 + ADD CONSTRAINT fk56da32dddbc23d07 FOREIGN KEY (students_id) REFERENCES person(id);
  1363 +
  1364 +
  1365 +--
  1366 +-- Name: fk56da32dded65d464; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1367 +--
  1368 +
  1369 +ALTER TABLE ONLY courseevaluation_person
  1370 + ADD CONSTRAINT fk56da32dded65d464 FOREIGN KEY (courseevaluation_id) REFERENCES courseevaluation(id);
  1371 +
  1372 +
  1373 +--
  1374 +-- Name: fk57aecf8d24818534; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1375 +--
  1376 +
  1377 +ALTER TABLE ONLY alternative
  1378 + ADD CONSTRAINT fk57aecf8d24818534 FOREIGN KEY (question_id) REFERENCES question(id);
  1379 +
  1380 +
  1381 +--
  1382 +-- Name: fk5af7f43c11d61984; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1383 +--
  1384 +
  1385 +ALTER TABLE ONLY coursescores
  1386 + ADD CONSTRAINT fk5af7f43c11d61984 FOREIGN KEY (student_id) REFERENCES person(id);
  1387 +
  1388 +
  1389 +--
  1390 +-- Name: fk5af7f43cff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1391 +--
  1392 +
  1393 +ALTER TABLE ONLY coursescores
  1394 + ADD CONSTRAINT fk5af7f43cff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1395 +
  1396 +
  1397 +--
  1398 +-- Name: fk5e3284616862da32; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1399 +--
  1400 +
  1401 +ALTER TABLE ONLY association
  1402 + ADD CONSTRAINT fk5e3284616862da32 FOREIGN KEY (questionassociation_id) REFERENCES question(id);
  1403 +
  1404 +
  1405 +--
  1406 +-- Name: fk752f2bde1f427644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1407 +--
  1408 +
  1409 +ALTER TABLE ONLY answer
  1410 + ADD CONSTRAINT fk752f2bde1f427644 FOREIGN KEY (poll_id) REFERENCES poll(id);
  1411 +
  1412 +
  1413 +--
  1414 +-- Name: fk752f2bde823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1415 +--
  1416 +
  1417 +ALTER TABLE ONLY answer
  1418 + ADD CONSTRAINT fk752f2bde823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1419 +
  1420 +
  1421 +--
  1422 +-- Name: fk784249c11f427644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1423 +--
  1424 +
  1425 +ALTER TABLE ONLY choice
  1426 + ADD CONSTRAINT fk784249c11f427644 FOREIGN KEY (poll_id) REFERENCES poll(id);
  1427 +
  1428 +
  1429 +--
  1430 +-- Name: fk78a7cc3b83dde8d0; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1431 +--
  1432 +
  1433 +ALTER TABLE ONLY course
  1434 + ADD CONSTRAINT fk78a7cc3b83dde8d0 FOREIGN KEY (professor_id) REFERENCES person(id);
  1435 +
  1436 +
  1437 +--
  1438 +-- Name: fk867521917f54daa1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1439 +--
  1440 +
  1441 +ALTER TABLE ONLY historylearningobject
  1442 + ADD CONSTRAINT fk867521917f54daa1 FOREIGN KEY (learning_object_id) REFERENCES learningobject(id);
  1443 +
  1444 +
  1445 +--
  1446 +-- Name: fk86752191823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1447 +--
  1448 +
  1449 +ALTER TABLE ONLY historylearningobject
  1450 + ADD CONSTRAINT fk86752191823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1451 +
  1452 +
  1453 +--
  1454 +-- Name: fk89b0928ca246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1455 +--
  1456 +
  1457 +ALTER TABLE ONLY module
  1458 + ADD CONSTRAINT fk89b0928ca246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1459 +
  1460 +
  1461 +--
  1462 +-- Name: fk8d28b1057f91492a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1463 +--
  1464 +
  1465 +ALTER TABLE ONLY openid
  1466 + ADD CONSTRAINT fk8d28b1057f91492a FOREIGN KEY (accessinfo_id) REFERENCES accessinfo(id);
  1467 +
  1468 +
  1469 +--
  1470 +-- Name: fk8e4887752188614a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1471 +--
  1472 +
  1473 +ALTER TABLE ONLY person
  1474 + ADD CONSTRAINT fk8e4887752188614a FOREIGN KEY (image_id) REFERENCES image(id);
  1475 +
  1476 +
  1477 +--
  1478 +-- Name: fk8e48877559d6cf33; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1479 +--
  1480 +
  1481 +ALTER TABLE ONLY person
  1482 + ADD CONSTRAINT fk8e48877559d6cf33 FOREIGN KEY (access_info_id) REFERENCES accessinfo(id);
  1483 +
  1484 +
  1485 +--
  1486 +-- Name: fk8e488775e65ce32a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1487 +--
  1488 +
  1489 +ALTER TABLE ONLY person
  1490 + ADD CONSTRAINT fk8e488775e65ce32a FOREIGN KEY (resume_id) REFERENCES resume(id);
  1491 +
  1492 +
  1493 +--
  1494 +-- Name: fk92ba7c24823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1495 +--
  1496 +
  1497 +ALTER TABLE ONLY userrequest
  1498 + ADD CONSTRAINT fk92ba7c24823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1499 +
  1500 +
  1501 +--
  1502 +-- Name: fk92ba7c24a246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1503 +--
  1504 +
  1505 +ALTER TABLE ONLY userrequest
  1506 + ADD CONSTRAINT fk92ba7c24a246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1507 +
  1508 +
  1509 +--
  1510 +-- Name: fk99c042db49a6ea84; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1511 +--
  1512 +
  1513 +ALTER TABLE ONLY alternativerealized
  1514 + ADD CONSTRAINT fk99c042db49a6ea84 FOREIGN KEY (questionrealized_id) REFERENCES questionrealized(id);
  1515 +
  1516 +
  1517 +--
  1518 +-- Name: fk99c042db97456112; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1519 +--
  1520 +
  1521 +ALTER TABLE ONLY alternativerealized
  1522 + ADD CONSTRAINT fk99c042db97456112 FOREIGN KEY (alternative_id) REFERENCES alternative(id);
  1523 +
  1524 +
  1525 +--
  1526 +-- Name: fk9c2397e7a7537834; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1527 +--
  1528 +
  1529 +ALTER TABLE ONLY message
  1530 + ADD CONSTRAINT fk9c2397e7a7537834 FOREIGN KEY (author_id) REFERENCES person(id);
  1531 +
  1532 +
  1533 +--
  1534 +-- Name: fk9c2397e7c475de70; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1535 +--
  1536 +
  1537 +ALTER TABLE ONLY message
  1538 + ADD CONSTRAINT fk9c2397e7c475de70 FOREIGN KEY (forum_id) REFERENCES forum(id);
  1539 +
  1540 +
  1541 +--
  1542 +-- Name: fk9f19801dff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1543 +--
  1544 +
  1545 +ALTER TABLE ONLY learningobject
  1546 + ADD CONSTRAINT fk9f19801dff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1547 +
  1548 +
  1549 +--
  1550 +-- Name: fka271969c5b17a68f; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1551 +--
  1552 +
  1553 +ALTER TABLE ONLY keywordsofcourse
  1554 + ADD CONSTRAINT fka271969c5b17a68f FOREIGN KEY (keywords_id) REFERENCES keyword(id);
  1555 +
  1556 +
  1557 +--
  1558 +-- Name: fka271969ca246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1559 +--
  1560 +
  1561 +ALTER TABLE ONLY keywordsofcourse
  1562 + ADD CONSTRAINT fka271969ca246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1563 +
  1564 +
  1565 +--
  1566 +-- Name: fka9fde35cff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1567 +--
  1568 +
  1569 +ALTER TABLE ONLY evaluation
  1570 + ADD CONSTRAINT fka9fde35cff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1571 +
  1572 +
  1573 +--
  1574 +-- Name: fkb1f68a5435ce4882; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1575 +--
  1576 +
  1577 +ALTER TABLE ONLY questionrealized
  1578 + ADD CONSTRAINT fkb1f68a5435ce4882 FOREIGN KEY (question_id) REFERENCES question(id);
  1579 +
  1580 +
  1581 +--
  1582 +-- Name: fkb1f68a5473cede12; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1583 +--
  1584 +
  1585 +ALTER TABLE ONLY questionrealized
  1586 + ADD CONSTRAINT fkb1f68a5473cede12 FOREIGN KEY (evaluationrealized_id) REFERENCES evaluationrealized(id);
  1587 +
  1588 +
  1589 +--
  1590 +-- Name: fkb71889c0a246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1591 +--
  1592 +
  1593 +ALTER TABLE ONLY course_coursescores
  1594 + ADD CONSTRAINT fkb71889c0a246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1595 +
  1596 +
  1597 +--
  1598 +-- Name: fkb71889c0d1da0a67; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1599 +--
  1600 +
  1601 +ALTER TABLE ONLY course_coursescores
  1602 + ADD CONSTRAINT fkb71889c0d1da0a67 FOREIGN KEY (studentsscores_id) REFERENCES coursescores(id);
  1603 +
  1604 +
  1605 +--
  1606 +-- Name: fkb72bfe85ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1607 +--
  1608 +
  1609 +ALTER TABLE ONLY externallink
  1610 + ADD CONSTRAINT fkb72bfe85ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1611 +
  1612 +
  1613 +--
  1614 +-- Name: fkbe5ca006a246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1615 +--
  1616 +
  1617 +ALTER TABLE ONLY question
  1618 + ADD CONSTRAINT fkbe5ca006a246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1619 +
  1620 +
  1621 +--
  1622 +-- Name: fkc6e06715ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1623 +--
  1624 +
  1625 +ALTER TABLE ONLY videoiriz
  1626 + ADD CONSTRAINT fkc6e06715ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1627 +
  1628 +
  1629 +--
  1630 +-- Name: fkdde91348ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1631 +--
  1632 +
  1633 +ALTER TABLE ONLY materialrequest
  1634 + ADD CONSTRAINT fkdde91348ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1635 +
  1636 +
  1637 +--
  1638 +-- Name: fke6ef9890ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1639 +--
  1640 +
  1641 +ALTER TABLE ONLY homework
  1642 + ADD CONSTRAINT fke6ef9890ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1643 +
  1644 +
  1645 +--
  1646 +-- Name: fkf8b89e1a823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1647 +--
  1648 +
  1649 +ALTER TABLE ONLY person_role_course
  1650 + ADD CONSTRAINT fkf8b89e1a823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1651 +
  1652 +
  1653 +--
  1654 +-- Name: fkf8b89e1a890ca6e4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1655 +--
  1656 +
  1657 +ALTER TABLE ONLY person_role_course
  1658 + ADD CONSTRAINT fkf8b89e1a890ca6e4 FOREIGN KEY (role_id) REFERENCES role(id);
  1659 +
  1660 +
  1661 +--
  1662 +-- Name: fkf8b89e1aa246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1663 +--
  1664 +
  1665 +ALTER TABLE ONLY person_role_course
  1666 + ADD CONSTRAINT fkf8b89e1aa246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1667 +
  1668 +
  1669 +--
  1670 +-- Name: fkfe0dea1982f6e1f2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1671 +--
  1672 +
  1673 +ALTER TABLE ONLY courseevaluation_criterion
  1674 + ADD CONSTRAINT fkfe0dea1982f6e1f2 FOREIGN KEY (criteria_id) REFERENCES criterion(id);
  1675 +
  1676 +
  1677 +--
  1678 +-- Name: fkfe0dea19ed65d464; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1679 +--
  1680 +
  1681 +ALTER TABLE ONLY courseevaluation_criterion
  1682 + ADD CONSTRAINT fkfe0dea19ed65d464 FOREIGN KEY (courseevaluation_id) REFERENCES courseevaluation(id);
  1683 +
  1684 +
  1685 +--
  1686 +-- Name: public; Type: ACL; Schema: -; Owner: postgres
  1687 +--
  1688 +
  1689 +REVOKE ALL ON SCHEMA public FROM PUBLIC;
  1690 +REVOKE ALL ON SCHEMA public FROM postgres;
  1691 +GRANT ALL ON SCHEMA public TO postgres;
  1692 +GRANT ALL ON SCHEMA public TO PUBLIC;
  1693 +
  1694 +
  1695 +--
  1696 +-- PostgreSQL database dump complete
  1697 +--
... ...
scripts/amadeuslms_web-v00.96.30.sql 0 → 100644
  1 +++ a/scripts/amadeuslms_web-v00.96.30.sql
... ... @@ -0,0 +1,1697 @@
  1 +--
  2 +-- PostgreSQL database dump
  3 +--
  4 +
  5 +SET client_encoding = 'UTF8';
  6 +SET standard_conforming_strings = off;
  7 +SET check_function_bodies = false;
  8 +SET client_min_messages = warning;
  9 +SET escape_string_warning = off;
  10 +
  11 +--
  12 +-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
  13 +--
  14 +
  15 +CREATE PROCEDURAL LANGUAGE plpgsql;
  16 +
  17 +
  18 +ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;
  19 +
  20 +SET search_path = public, pg_catalog;
  21 +
  22 +SET default_tablespace = '';
  23 +
  24 +SET default_with_oids = false;
  25 +
  26 +--
  27 +-- Name: accessinfo; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  28 +--
  29 +
  30 +CREATE TABLE accessinfo (
  31 + id integer NOT NULL,
  32 + login character varying(255),
  33 + password character varying(255),
  34 + profile_type integer NOT NULL
  35 +);
  36 +
  37 +
  38 +ALTER TABLE public.accessinfo OWNER TO postgres;
  39 +
  40 +--
  41 +-- Name: alternative; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  42 +--
  43 +
  44 +CREATE TABLE alternative (
  45 + id integer NOT NULL,
  46 + correct boolean NOT NULL,
  47 + description character varying(8000),
  48 + question_id integer
  49 +);
  50 +
  51 +
  52 +ALTER TABLE public.alternative OWNER TO postgres;
  53 +
  54 +--
  55 +-- Name: alternativerealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  56 +--
  57 +
  58 +CREATE TABLE alternativerealized (
  59 + id integer NOT NULL,
  60 + answer boolean NOT NULL,
  61 + alternative_id integer,
  62 + questionrealized_id integer NOT NULL
  63 +);
  64 +
  65 +
  66 +ALTER TABLE public.alternativerealized OWNER TO postgres;
  67 +
  68 +--
  69 +-- Name: answer; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  70 +--
  71 +
  72 +CREATE TABLE answer (
  73 + id integer NOT NULL,
  74 + answerdate timestamp without time zone,
  75 + person_id integer,
  76 + poll_id integer NOT NULL,
  77 + "position" integer
  78 +);
  79 +
  80 +
  81 +ALTER TABLE public.answer OWNER TO postgres;
  82 +
  83 +--
  84 +-- Name: archive; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  85 +--
  86 +
  87 +CREATE TABLE archive (
  88 + id integer NOT NULL,
  89 + archive bytea
  90 +);
  91 +
  92 +
  93 +ALTER TABLE public.archive OWNER TO postgres;
  94 +
  95 +--
  96 +-- Name: association; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  97 +--
  98 +
  99 +CREATE TABLE association (
  100 + questionassociation_id integer NOT NULL,
  101 + value character varying(255) NOT NULL,
  102 + _key character varying(255) NOT NULL
  103 +);
  104 +
  105 +
  106 +ALTER TABLE public.association OWNER TO postgres;
  107 +
  108 +--
  109 +-- Name: associationrealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  110 +--
  111 +
  112 +CREATE TABLE associationrealized (
  113 + questionrealized_id integer NOT NULL,
  114 + value character varying(255) NOT NULL,
  115 + _key character varying(255) NOT NULL
  116 +);
  117 +
  118 +
  119 +ALTER TABLE public.associationrealized OWNER TO postgres;
  120 +
  121 +--
  122 +-- Name: choice; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  123 +--
  124 +
  125 +CREATE TABLE choice (
  126 + id integer NOT NULL,
  127 + alternative character varying(255),
  128 + percentage double precision NOT NULL,
  129 + votes integer NOT NULL,
  130 + poll_id integer NOT NULL,
  131 + "position" integer
  132 +);
  133 +
  134 +
  135 +ALTER TABLE public.choice OWNER TO postgres;
  136 +
  137 +--
  138 +-- Name: commentary; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  139 +--
  140 +
  141 +CREATE TABLE commentary (
  142 + id integer NOT NULL,
  143 + description character varying(255)
  144 +);
  145 +
  146 +
  147 +ALTER TABLE public.commentary OWNER TO postgres;
  148 +
  149 +--
  150 +-- Name: course; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  151 +--
  152 +
  153 +CREATE TABLE course (
  154 + id integer NOT NULL,
  155 + content character varying(2000),
  156 + creationdate timestamp without time zone,
  157 + finalcoursedate timestamp without time zone,
  158 + finalregistrationdate timestamp without time zone,
  159 + initialcoursedate timestamp without time zone,
  160 + initialregistrationdate timestamp without time zone,
  161 + maxamountstudents integer NOT NULL,
  162 + name character varying(255),
  163 + objectives character varying(2000),
  164 + professor_id integer
  165 +);
  166 +
  167 +
  168 +ALTER TABLE public.course OWNER TO postgres;
  169 +
  170 +--
  171 +-- Name: course_coursescores; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  172 +--
  173 +
  174 +CREATE TABLE course_coursescores (
  175 + course_id integer NOT NULL,
  176 + studentsscores_id integer NOT NULL
  177 +);
  178 +
  179 +
  180 +ALTER TABLE public.course_coursescores OWNER TO postgres;
  181 +
  182 +--
  183 +-- Name: courseevaluation; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  184 +--
  185 +
  186 +CREATE TABLE courseevaluation (
  187 + id integer NOT NULL,
  188 + initdate timestamp without time zone
  189 +);
  190 +
  191 +
  192 +ALTER TABLE public.courseevaluation OWNER TO postgres;
  193 +
  194 +--
  195 +-- Name: courseevaluation_commentary; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  196 +--
  197 +
  198 +CREATE TABLE courseevaluation_commentary (
  199 + courseevaluation_id integer NOT NULL,
  200 + commentaries_id integer NOT NULL,
  201 + commentary_position integer NOT NULL
  202 +);
  203 +
  204 +
  205 +ALTER TABLE public.courseevaluation_commentary OWNER TO postgres;
  206 +
  207 +--
  208 +-- Name: courseevaluation_criterion; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  209 +--
  210 +
  211 +CREATE TABLE courseevaluation_criterion (
  212 + courseevaluation_id integer NOT NULL,
  213 + criteria_id integer NOT NULL,
  214 + criterion_position integer NOT NULL
  215 +);
  216 +
  217 +
  218 +ALTER TABLE public.courseevaluation_criterion OWNER TO postgres;
  219 +
  220 +--
  221 +-- Name: courseevaluation_person; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  222 +--
  223 +
  224 +CREATE TABLE courseevaluation_person (
  225 + courseevaluation_id integer NOT NULL,
  226 + students_id integer NOT NULL
  227 +);
  228 +
  229 +
  230 +ALTER TABLE public.courseevaluation_person OWNER TO postgres;
  231 +
  232 +--
  233 +-- Name: coursescores; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  234 +--
  235 +
  236 +CREATE TABLE coursescores (
  237 + id integer NOT NULL,
  238 + coursescore double precision NOT NULL,
  239 + student_id integer,
  240 + module_id integer NOT NULL
  241 +);
  242 +
  243 +
  244 +ALTER TABLE public.coursescores OWNER TO postgres;
  245 +
  246 +--
  247 +-- Name: criterion; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  248 +--
  249 +
  250 +CREATE TABLE criterion (
  251 + id integer NOT NULL,
  252 + ctype integer
  253 +);
  254 +
  255 +
  256 +ALTER TABLE public.criterion OWNER TO postgres;
  257 +
  258 +--
  259 +-- Name: criterion_criterionanswers; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  260 +--
  261 +
  262 +CREATE TABLE criterion_criterionanswers (
  263 + criterion_id integer NOT NULL,
  264 + answers_id integer NOT NULL
  265 +);
  266 +
  267 +
  268 +ALTER TABLE public.criterion_criterionanswers OWNER TO postgres;
  269 +
  270 +--
  271 +-- Name: criterionanswers; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  272 +--
  273 +
  274 +CREATE TABLE criterionanswers (
  275 + id integer NOT NULL,
  276 + aalmostalwaysvotes integer NOT NULL,
  277 + aalmostnevervotes integer NOT NULL,
  278 + afrequentlyvotes integer NOT NULL,
  279 + ararelyvotes integer NOT NULL,
  280 + asometimesvotes integer NOT NULL,
  281 + atotalvotes integer NOT NULL,
  282 + dalmostalwaysvotes integer NOT NULL,
  283 + dalmostnevervotes integer NOT NULL,
  284 + dfrequentlyvotes integer NOT NULL,
  285 + drarelyvotes integer NOT NULL,
  286 + dsometimesvotes integer NOT NULL,
  287 + dtotalvotes integer NOT NULL
  288 +);
  289 +
  290 +
  291 +ALTER TABLE public.criterionanswers OWNER TO postgres;
  292 +
  293 +--
  294 +-- Name: delivery; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  295 +--
  296 +
  297 +CREATE TABLE delivery (
  298 + id integer NOT NULL,
  299 + archive bytea,
  300 + date timestamp without time zone,
  301 + person_id integer,
  302 + homework_id integer
  303 +);
  304 +
  305 +
  306 +ALTER TABLE public.delivery OWNER TO postgres;
  307 +
  308 +--
  309 +-- Name: evaluation; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  310 +--
  311 +
  312 +CREATE TABLE evaluation (
  313 + id integer NOT NULL,
  314 + afterdeadlineachieved boolean NOT NULL,
  315 + description character varying(8000),
  316 + finish timestamp without time zone,
  317 + start timestamp without time zone,
  318 + module_id integer
  319 +);
  320 +
  321 +
  322 +ALTER TABLE public.evaluation OWNER TO postgres;
  323 +
  324 +--
  325 +-- Name: evaluation_question; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  326 +--
  327 +
  328 +CREATE TABLE evaluation_question (
  329 + evaluation_id integer NOT NULL,
  330 + question_id integer NOT NULL
  331 +);
  332 +
  333 +
  334 +ALTER TABLE public.evaluation_question OWNER TO postgres;
  335 +
  336 +--
  337 +-- Name: evaluationrealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  338 +--
  339 +
  340 +CREATE TABLE evaluationrealized (
  341 + id integer NOT NULL,
  342 + correcteddate timestamp without time zone,
  343 + grade real NOT NULL,
  344 + realizeddate timestamp without time zone,
  345 + person_id integer,
  346 + evaluation_id integer NOT NULL
  347 +);
  348 +
  349 +
  350 +ALTER TABLE public.evaluationrealized OWNER TO postgres;
  351 +
  352 +--
  353 +-- Name: externallink; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  354 +--
  355 +
  356 +CREATE TABLE externallink (
  357 + id integer NOT NULL,
  358 + creationdate date,
  359 + description character varying(1000),
  360 + name character varying(255),
  361 + url character varying(500),
  362 + module_id integer NOT NULL
  363 +);
  364 +
  365 +
  366 +ALTER TABLE public.externallink OWNER TO postgres;
  367 +
  368 +--
  369 +-- Name: forum; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  370 +--
  371 +
  372 +CREATE TABLE forum (
  373 + id integer NOT NULL,
  374 + description character varying(9000),
  375 + creationdate timestamp without time zone,
  376 + name character varying(255),
  377 + module_id integer NOT NULL
  378 +);
  379 +
  380 +
  381 +ALTER TABLE public.forum OWNER TO postgres;
  382 +
  383 +--
  384 +-- Name: game; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  385 +--
  386 +
  387 +CREATE TABLE game (
  388 + id integer NOT NULL,
  389 + creationdate timestamp without time zone,
  390 + description character varying(255),
  391 + image bytea,
  392 + maxusers integer NOT NULL,
  393 + minusers integer NOT NULL,
  394 + name character varying(255),
  395 + url character varying(255),
  396 + module_id integer NOT NULL
  397 +);
  398 +
  399 +
  400 +
  401 +ALTER TABLE public.game OWNER TO postgres;
  402 +
  403 +--
  404 +-- Name: gapanswer; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  405 +--
  406 +
  407 +CREATE TABLE gapanswer (
  408 + questionrealized_id integer NOT NULL,
  409 + answer character varying(255) NOT NULL
  410 +);
  411 +
  412 +
  413 +ALTER TABLE public.gapanswer OWNER TO postgres;
  414 +
  415 +--
  416 +-- Name: hibernate_sequence; Type: SEQUENCE; Schema: public; Owner: postgres
  417 +--
  418 +
  419 +CREATE SEQUENCE hibernate_sequence
  420 + INCREMENT BY 1
  421 + NO MAXVALUE
  422 + NO MINVALUE
  423 + CACHE 1;
  424 +
  425 +
  426 +ALTER TABLE public.hibernate_sequence OWNER TO postgres;
  427 +
  428 +--
  429 +-- Name: historylearningobject; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  430 +--
  431 +
  432 +CREATE TABLE historylearningobject (
  433 + id integer NOT NULL,
  434 + dateaccess timestamp without time zone,
  435 + dateendaccess timestamp without time zone,
  436 + score character varying(255),
  437 + timeaccess time without time zone,
  438 + learning_object_id integer NOT NULL,
  439 + person_id integer NOT NULL
  440 +);
  441 +
  442 +
  443 +ALTER TABLE public.historylearningobject OWNER TO postgres;
  444 +
  445 +--
  446 +-- Name: homework; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  447 +--
  448 +
  449 +CREATE TABLE homework (
  450 + id integer NOT NULL,
  451 + allowpostponing timestamp without time zone,
  452 + deadline timestamp without time zone,
  453 + description character varying(255),
  454 + initdate timestamp without time zone,
  455 + name character varying(255),
  456 + module_id integer NOT NULL
  457 +);
  458 +
  459 +
  460 +ALTER TABLE public.homework OWNER TO postgres;
  461 +
  462 +--
  463 +-- Name: image; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  464 +--
  465 +
  466 +CREATE TABLE image (
  467 + id integer NOT NULL,
  468 + photo bytea
  469 +);
  470 +
  471 +
  472 +ALTER TABLE public.image OWNER TO postgres;
  473 +
  474 +--
  475 +-- Name: keyword; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  476 +--
  477 +
  478 +CREATE TABLE keyword (
  479 + id integer NOT NULL,
  480 + name character varying(255),
  481 + popularity integer NOT NULL
  482 +);
  483 +
  484 +
  485 +ALTER TABLE public.keyword OWNER TO postgres;
  486 +
  487 +--
  488 +-- Name: keywordsofcourse; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  489 +--
  490 +
  491 +CREATE TABLE keywordsofcourse (
  492 + course_id integer NOT NULL,
  493 + keywords_id integer NOT NULL
  494 +);
  495 +
  496 +
  497 +ALTER TABLE public.keywordsofcourse OWNER TO postgres;
  498 +
  499 +--
  500 +-- Name: learningobject; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  501 +--
  502 +
  503 +CREATE TABLE learningobject (
  504 + id integer NOT NULL,
  505 + creationdate timestamp without time zone,
  506 + description character varying(255),
  507 + name character varying(255),
  508 + url character varying(255),
  509 + module_id integer NOT NULL
  510 +);
  511 +
  512 +
  513 +ALTER TABLE public.learningobject OWNER TO postgres;
  514 +
  515 +--
  516 +-- Name: material; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  517 +--
  518 +
  519 +CREATE TABLE material (
  520 + id integer NOT NULL,
  521 + allowlatedeliveries boolean NOT NULL,
  522 + archivename character varying(255),
  523 + correcteddate timestamp without time zone,
  524 + extension character varying(255),
  525 + grade real,
  526 + creationdate timestamp without time zone,
  527 + author_id integer,
  528 + archive_id integer NOT NULL,
  529 + module_id integer NOT NULL,
  530 + request_id integer
  531 +);
  532 +
  533 +
  534 +ALTER TABLE public.material OWNER TO postgres;
  535 +
  536 +--
  537 +-- Name: materialrequest; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  538 +--
  539 +
  540 +CREATE TABLE materialrequest (
  541 + id integer NOT NULL,
  542 + allowlatedeliveries boolean NOT NULL,
  543 + deliverydate timestamp without time zone,
  544 + description character varying(255),
  545 + name character varying(255),
  546 + module_id integer NOT NULL,
  547 + creationdate timestamp without time zone
  548 +);
  549 +
  550 +
  551 +ALTER TABLE public.materialrequest OWNER TO postgres;
  552 +
  553 +--
  554 +-- Name: message; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  555 +--
  556 +
  557 +CREATE TABLE message (
  558 + id integer NOT NULL,
  559 + body character varying(9000),
  560 + date timestamp without time zone,
  561 + forum_id integer NOT NULL,
  562 + author_id integer,
  563 + "position" integer
  564 +);
  565 +
  566 +
  567 +ALTER TABLE public.message OWNER TO postgres;
  568 +
  569 +--
  570 +-- Name: module; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  571 +--
  572 +
  573 +CREATE TABLE module (
  574 + id integer NOT NULL,
  575 + description character varying(1500),
  576 + name character varying(255),
  577 + "position" integer NOT NULL,
  578 + visible boolean NOT NULL,
  579 + course_id integer NOT NULL
  580 +);
  581 +
  582 +
  583 +ALTER TABLE public.module OWNER TO postgres;
  584 +
  585 +--
  586 +-- Name: openid; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  587 +--
  588 +
  589 +CREATE TABLE openid (
  590 + id integer NOT NULL,
  591 + email character varying(255),
  592 + _identity character varying(255),
  593 + name character varying(255),
  594 + provideby character varying(255),
  595 + accessinfo_id integer NOT NULL
  596 +);
  597 +
  598 +
  599 +ALTER TABLE public.openid OWNER TO postgres;
  600 +
  601 +--
  602 +-- Name: person; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  603 +--
  604 +
  605 +CREATE TABLE person (
  606 + id integer NOT NULL,
  607 + birthdate timestamp without time zone,
  608 + city character varying(255),
  609 + cpf character varying(255),
  610 + email character varying(255),
  611 + gender character(1) NOT NULL,
  612 + name character varying(255),
  613 + phonenumber character varying(255),
  614 + state character varying(255),
  615 + access_info_id integer,
  616 + image_id integer,
  617 + resume_id integer
  618 +);
  619 +
  620 +
  621 +ALTER TABLE public.person OWNER TO postgres;
  622 +
  623 +--
  624 +-- Name: person_role_course; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  625 +--
  626 +
  627 +CREATE TABLE person_role_course (
  628 + id integer NOT NULL,
  629 + person_id integer,
  630 + course_id integer NOT NULL,
  631 + role_id integer
  632 +);
  633 +
  634 +
  635 +ALTER TABLE public.person_role_course OWNER TO postgres;
  636 +
  637 +--
  638 +-- Name: poll; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  639 +--
  640 +
  641 +CREATE TABLE poll (
  642 + id integer NOT NULL,
  643 + finishdate timestamp without time zone,
  644 + creationdate timestamp without time zone,
  645 + name character varying(255),
  646 + question character varying(255),
  647 + module_id integer NOT NULL
  648 +);
  649 +
  650 +
  651 +ALTER TABLE public.poll OWNER TO postgres;
  652 +
  653 +--
  654 +-- Name: question; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  655 +--
  656 +
  657 +CREATE TABLE question (
  658 + dtype character varying(31) NOT NULL,
  659 + id integer NOT NULL,
  660 + description character varying(8000),
  661 + course_id integer NOT NULL
  662 +);
  663 +
  664 +
  665 +ALTER TABLE public.question OWNER TO postgres;
  666 +
  667 +--
  668 +-- Name: questionrealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  669 +--
  670 +
  671 +CREATE TABLE questionrealized (
  672 + dtype character varying(31) NOT NULL,
  673 + id integer NOT NULL,
  674 + comment character varying(8000),
  675 + grade real NOT NULL,
  676 + answer character varying(8000),
  677 + question_id integer,
  678 + evaluationrealized_id integer NOT NULL
  679 +);
  680 +
  681 +
  682 +ALTER TABLE public.questionrealized OWNER TO postgres;
  683 +
  684 +--
  685 +-- Name: resume; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  686 +--
  687 +
  688 +CREATE TABLE resume (
  689 + id integer NOT NULL,
  690 + degree character varying(255),
  691 + description character varying(255),
  692 + instituition character varying(255),
  693 + year integer
  694 +);
  695 +
  696 +
  697 +ALTER TABLE public.resume OWNER TO postgres;
  698 +
  699 +--
  700 +-- Name: role; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  701 +--
  702 +
  703 +CREATE TABLE role (
  704 + id integer NOT NULL,
  705 + role_type integer NOT NULL
  706 +);
  707 +
  708 +
  709 +ALTER TABLE public.role OWNER TO postgres;
  710 +
  711 +--
  712 +-- Name: userrequest; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  713 +--
  714 +
  715 +CREATE TABLE userrequest (
  716 + id integer NOT NULL,
  717 + interest character varying(255),
  718 + status_type integer NOT NULL,
  719 + teachingrequest boolean NOT NULL,
  720 + userrequestdate timestamp without time zone,
  721 + course_id integer,
  722 + person_id integer
  723 +);
  724 +
  725 +
  726 +ALTER TABLE public.userrequest OWNER TO postgres;
  727 +
  728 +--
  729 +-- Name: videoiriz; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  730 +--
  731 +
  732 +CREATE TABLE videoiriz (
  733 + id integer NOT NULL,
  734 + description character varying(255),
  735 + name character varying(255),
  736 + uploaded boolean NOT NULL,
  737 + youtubeid character varying(255),
  738 + module_id integer NOT NULL,
  739 + creationdate timestamp without time zone
  740 +);
  741 +
  742 +
  743 +ALTER TABLE public.videoiriz OWNER TO postgres;
  744 +
  745 +--
  746 +-- Name: accessinfo_login_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  747 +--
  748 +
  749 +ALTER TABLE ONLY accessinfo
  750 + ADD CONSTRAINT accessinfo_login_key UNIQUE (login);
  751 +
  752 +
  753 +--
  754 +-- Name: accessinfo_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  755 +--
  756 +
  757 +ALTER TABLE ONLY accessinfo
  758 + ADD CONSTRAINT accessinfo_pkey PRIMARY KEY (id);
  759 +
  760 +
  761 +--
  762 +-- Name: alternative_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  763 +--
  764 +
  765 +ALTER TABLE ONLY alternative
  766 + ADD CONSTRAINT alternative_pkey PRIMARY KEY (id);
  767 +
  768 +
  769 +--
  770 +-- Name: alternativerealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  771 +--
  772 +
  773 +ALTER TABLE ONLY alternativerealized
  774 + ADD CONSTRAINT alternativerealized_pkey PRIMARY KEY (id);
  775 +
  776 +
  777 +--
  778 +-- Name: answer_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  779 +--
  780 +
  781 +ALTER TABLE ONLY answer
  782 + ADD CONSTRAINT answer_pkey PRIMARY KEY (id);
  783 +
  784 +
  785 +--
  786 +-- Name: archive_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  787 +--
  788 +
  789 +ALTER TABLE ONLY archive
  790 + ADD CONSTRAINT archive_pkey PRIMARY KEY (id);
  791 +
  792 +
  793 +--
  794 +-- Name: association_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  795 +--
  796 +
  797 +ALTER TABLE ONLY association
  798 + ADD CONSTRAINT association_pkey PRIMARY KEY (questionassociation_id, _key);
  799 +
  800 +
  801 +--
  802 +-- Name: associationrealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  803 +--
  804 +
  805 +ALTER TABLE ONLY associationrealized
  806 + ADD CONSTRAINT associationrealized_pkey PRIMARY KEY (questionrealized_id, _key);
  807 +
  808 +
  809 +--
  810 +-- Name: choice_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  811 +--
  812 +
  813 +ALTER TABLE ONLY choice
  814 + ADD CONSTRAINT choice_pkey PRIMARY KEY (id);
  815 +
  816 +
  817 +--
  818 +-- Name: commentary_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  819 +--
  820 +
  821 +ALTER TABLE ONLY commentary
  822 + ADD CONSTRAINT commentary_pkey PRIMARY KEY (id);
  823 +
  824 +
  825 +--
  826 +-- Name: course_coursescores_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  827 +--
  828 +
  829 +ALTER TABLE ONLY course_coursescores
  830 + ADD CONSTRAINT course_coursescores_pkey PRIMARY KEY (course_id, studentsscores_id);
  831 +
  832 +
  833 +--
  834 +-- Name: course_coursescores_studentsscores_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  835 +--
  836 +
  837 +ALTER TABLE ONLY course_coursescores
  838 + ADD CONSTRAINT course_coursescores_studentsscores_id_key UNIQUE (studentsscores_id);
  839 +
  840 +
  841 +--
  842 +-- Name: course_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  843 +--
  844 +
  845 +ALTER TABLE ONLY course
  846 + ADD CONSTRAINT course_pkey PRIMARY KEY (id);
  847 +
  848 +
  849 +--
  850 +-- Name: courseevaluation_commentary_commentaries_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  851 +--
  852 +
  853 +ALTER TABLE ONLY courseevaluation_commentary
  854 + ADD CONSTRAINT courseevaluation_commentary_commentaries_id_key UNIQUE (commentaries_id);
  855 +
  856 +
  857 +--
  858 +-- Name: courseevaluation_commentary_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  859 +--
  860 +
  861 +ALTER TABLE ONLY courseevaluation_commentary
  862 + ADD CONSTRAINT courseevaluation_commentary_pkey PRIMARY KEY (courseevaluation_id, commentary_position);
  863 +
  864 +
  865 +--
  866 +-- Name: courseevaluation_criterion_criteria_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  867 +--
  868 +
  869 +ALTER TABLE ONLY courseevaluation_criterion
  870 + ADD CONSTRAINT courseevaluation_criterion_criteria_id_key UNIQUE (criteria_id);
  871 +
  872 +
  873 +--
  874 +-- Name: courseevaluation_criterion_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  875 +--
  876 +
  877 +ALTER TABLE ONLY courseevaluation_criterion
  878 + ADD CONSTRAINT courseevaluation_criterion_pkey PRIMARY KEY (courseevaluation_id, criterion_position);
  879 +
  880 +
  881 +--
  882 +-- Name: courseevaluation_person_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  883 +--
  884 +
  885 +ALTER TABLE ONLY courseevaluation_person
  886 + ADD CONSTRAINT courseevaluation_person_pkey PRIMARY KEY (courseevaluation_id, students_id);
  887 +
  888 +
  889 +--
  890 +-- Name: courseevaluation_person_students_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  891 +--
  892 +
  893 +ALTER TABLE ONLY courseevaluation_person
  894 + ADD CONSTRAINT courseevaluation_person_students_id_key UNIQUE (students_id);
  895 +
  896 +
  897 +--
  898 +-- Name: courseevaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  899 +--
  900 +
  901 +ALTER TABLE ONLY courseevaluation
  902 + ADD CONSTRAINT courseevaluation_pkey PRIMARY KEY (id);
  903 +
  904 +
  905 +--
  906 +-- Name: coursescores_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  907 +--
  908 +
  909 +ALTER TABLE ONLY coursescores
  910 + ADD CONSTRAINT coursescores_pkey PRIMARY KEY (id);
  911 +
  912 +
  913 +--
  914 +-- Name: criterion_criterionanswers_answers_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  915 +--
  916 +
  917 +ALTER TABLE ONLY criterion_criterionanswers
  918 + ADD CONSTRAINT criterion_criterionanswers_answers_id_key UNIQUE (answers_id);
  919 +
  920 +
  921 +--
  922 +-- Name: criterion_criterionanswers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  923 +--
  924 +
  925 +ALTER TABLE ONLY criterion_criterionanswers
  926 + ADD CONSTRAINT criterion_criterionanswers_pkey PRIMARY KEY (criterion_id, answers_id);
  927 +
  928 +
  929 +--
  930 +-- Name: criterion_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  931 +--
  932 +
  933 +ALTER TABLE ONLY criterion
  934 + ADD CONSTRAINT criterion_pkey PRIMARY KEY (id);
  935 +
  936 +
  937 +--
  938 +-- Name: criterionanswers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  939 +--
  940 +
  941 +ALTER TABLE ONLY criterionanswers
  942 + ADD CONSTRAINT criterionanswers_pkey PRIMARY KEY (id);
  943 +
  944 +
  945 +--
  946 +-- Name: delivery_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  947 +--
  948 +
  949 +ALTER TABLE ONLY delivery
  950 + ADD CONSTRAINT delivery_pkey PRIMARY KEY (id);
  951 +
  952 +
  953 +--
  954 +-- Name: evaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  955 +--
  956 +
  957 +ALTER TABLE ONLY evaluation
  958 + ADD CONSTRAINT evaluation_pkey PRIMARY KEY (id);
  959 +
  960 +
  961 +--
  962 +-- Name: evaluationrealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  963 +--
  964 +
  965 +ALTER TABLE ONLY evaluationrealized
  966 + ADD CONSTRAINT evaluationrealized_pkey PRIMARY KEY (id);
  967 +
  968 +
  969 +--
  970 +-- Name: externallink_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  971 +--
  972 +
  973 +ALTER TABLE ONLY externallink
  974 + ADD CONSTRAINT externallink_pkey PRIMARY KEY (id);
  975 +
  976 +
  977 +--
  978 +-- Name: forum_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  979 +--
  980 +
  981 +ALTER TABLE ONLY forum
  982 + ADD CONSTRAINT forum_pkey PRIMARY KEY (id);
  983 +
  984 +
  985 +--
  986 +-- Name: game_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  987 +--
  988 +
  989 +ALTER TABLE ONLY game
  990 + ADD CONSTRAINT game_pkey PRIMARY KEY (id);
  991 +
  992 +
  993 +--
  994 +-- Name: historylearningobject_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  995 +--
  996 +
  997 +ALTER TABLE ONLY historylearningobject
  998 + ADD CONSTRAINT historylearningobject_pkey PRIMARY KEY (id);
  999 +
  1000 +
  1001 +--
  1002 +-- Name: homework_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1003 +--
  1004 +
  1005 +ALTER TABLE ONLY homework
  1006 + ADD CONSTRAINT homework_pkey PRIMARY KEY (id);
  1007 +
  1008 +
  1009 +--
  1010 +-- Name: image_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1011 +--
  1012 +
  1013 +ALTER TABLE ONLY image
  1014 + ADD CONSTRAINT image_pkey PRIMARY KEY (id);
  1015 +
  1016 +
  1017 +--
  1018 +-- Name: keyword_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1019 +--
  1020 +
  1021 +ALTER TABLE ONLY keyword
  1022 + ADD CONSTRAINT keyword_name_key UNIQUE (name);
  1023 +
  1024 +
  1025 +--
  1026 +-- Name: keyword_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1027 +--
  1028 +
  1029 +ALTER TABLE ONLY keyword
  1030 + ADD CONSTRAINT keyword_pkey PRIMARY KEY (id);
  1031 +
  1032 +
  1033 +--
  1034 +-- Name: keywordsofcourse_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1035 +--
  1036 +
  1037 +ALTER TABLE ONLY keywordsofcourse
  1038 + ADD CONSTRAINT keywordsofcourse_pkey PRIMARY KEY (course_id, keywords_id);
  1039 +
  1040 +
  1041 +--
  1042 +-- Name: learningobject_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1043 +--
  1044 +
  1045 +ALTER TABLE ONLY learningobject
  1046 + ADD CONSTRAINT learningobject_pkey PRIMARY KEY (id);
  1047 +
  1048 +
  1049 +--
  1050 +-- Name: material_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1051 +--
  1052 +
  1053 +ALTER TABLE ONLY material
  1054 + ADD CONSTRAINT material_pkey PRIMARY KEY (id);
  1055 +
  1056 +
  1057 +--
  1058 +-- Name: materialrequest_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1059 +--
  1060 +
  1061 +ALTER TABLE ONLY materialrequest
  1062 + ADD CONSTRAINT materialrequest_pkey PRIMARY KEY (id);
  1063 +
  1064 +
  1065 +--
  1066 +-- Name: message_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1067 +--
  1068 +
  1069 +ALTER TABLE ONLY message
  1070 + ADD CONSTRAINT message_pkey PRIMARY KEY (id);
  1071 +
  1072 +
  1073 +--
  1074 +-- Name: module_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1075 +--
  1076 +
  1077 +ALTER TABLE ONLY module
  1078 + ADD CONSTRAINT module_pkey PRIMARY KEY (id);
  1079 +
  1080 +
  1081 +--
  1082 +-- Name: openid_identity_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1083 +--
  1084 +
  1085 +ALTER TABLE ONLY openid
  1086 + ADD CONSTRAINT openid_identity_key UNIQUE (_identity);
  1087 +
  1088 +
  1089 +--
  1090 +-- Name: openid_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1091 +--
  1092 +
  1093 +ALTER TABLE ONLY openid
  1094 + ADD CONSTRAINT openid_pkey PRIMARY KEY (id);
  1095 +
  1096 +
  1097 +--
  1098 +-- Name: person_email_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1099 +--
  1100 +
  1101 +ALTER TABLE ONLY person
  1102 + ADD CONSTRAINT person_email_key UNIQUE (email);
  1103 +
  1104 +
  1105 +--
  1106 +-- Name: person_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1107 +--
  1108 +
  1109 +ALTER TABLE ONLY person
  1110 + ADD CONSTRAINT person_pkey PRIMARY KEY (id);
  1111 +
  1112 +
  1113 +--
  1114 +-- Name: person_role_course_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1115 +--
  1116 +
  1117 +ALTER TABLE ONLY person_role_course
  1118 + ADD CONSTRAINT person_role_course_pkey PRIMARY KEY (id);
  1119 +
  1120 +
  1121 +--
  1122 +-- Name: poll_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1123 +--
  1124 +
  1125 +ALTER TABLE ONLY poll
  1126 + ADD CONSTRAINT poll_pkey PRIMARY KEY (id);
  1127 +
  1128 +
  1129 +--
  1130 +-- Name: primarykeyconstraint; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1131 +--
  1132 +
  1133 +ALTER TABLE ONLY evaluation_question
  1134 + ADD CONSTRAINT primarykeyconstraint PRIMARY KEY (evaluation_id, question_id);
  1135 +
  1136 +
  1137 +--
  1138 +-- Name: question_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1139 +--
  1140 +
  1141 +ALTER TABLE ONLY question
  1142 + ADD CONSTRAINT question_pkey PRIMARY KEY (id);
  1143 +
  1144 +
  1145 +--
  1146 +-- Name: questionrealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1147 +--
  1148 +
  1149 +ALTER TABLE ONLY questionrealized
  1150 + ADD CONSTRAINT questionrealized_pkey PRIMARY KEY (id);
  1151 +
  1152 +
  1153 +--
  1154 +-- Name: resume_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1155 +--
  1156 +
  1157 +ALTER TABLE ONLY resume
  1158 + ADD CONSTRAINT resume_pkey PRIMARY KEY (id);
  1159 +
  1160 +
  1161 +--
  1162 +-- Name: role_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1163 +--
  1164 +
  1165 +ALTER TABLE ONLY role
  1166 + ADD CONSTRAINT role_pkey PRIMARY KEY (id);
  1167 +
  1168 +
  1169 +--
  1170 +-- Name: uniquekey_person_course; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1171 +--
  1172 +
  1173 +ALTER TABLE ONLY person_role_course
  1174 + ADD CONSTRAINT uniquekey_person_course UNIQUE (person_id, course_id);
  1175 +
  1176 +
  1177 +--
  1178 +-- Name: uniquekey_person_evaluation; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1179 +--
  1180 +
  1181 +ALTER TABLE ONLY evaluationrealized
  1182 + ADD CONSTRAINT uniquekey_person_evaluation UNIQUE (person_id, evaluation_id);
  1183 +
  1184 +
  1185 +--
  1186 +-- Name: userrequest_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1187 +--
  1188 +
  1189 +ALTER TABLE ONLY userrequest
  1190 + ADD CONSTRAINT userrequest_pkey PRIMARY KEY (id);
  1191 +
  1192 +
  1193 +--
  1194 +-- Name: videoiriz_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1195 +--
  1196 +
  1197 +ALTER TABLE ONLY videoiriz
  1198 + ADD CONSTRAINT videoiriz_pkey PRIMARY KEY (id);
  1199 +
  1200 +
  1201 +--
  1202 +-- Name: fk1535e21440c3070c; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1203 +--
  1204 +
  1205 +ALTER TABLE ONLY gapanswer
  1206 + ADD CONSTRAINT fk1535e21440c3070c FOREIGN KEY (questionrealized_id) REFERENCES questionrealized(id);
  1207 +
  1208 +
  1209 +--
  1210 +-- Name: fk15adc9475d0e3509; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1211 +--
  1212 +
  1213 +ALTER TABLE ONLY material
  1214 + ADD CONSTRAINT fk15adc9475d0e3509 FOREIGN KEY (request_id) REFERENCES materialrequest(id);
  1215 +
  1216 +
  1217 +--
  1218 +-- Name: fk15adc947a6287150; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1219 +--
  1220 +
  1221 +ALTER TABLE ONLY material
  1222 + ADD CONSTRAINT fk15adc947a6287150 FOREIGN KEY (archive_id) REFERENCES archive(id);
  1223 +
  1224 +
  1225 +--
  1226 +-- Name: fk15adc947a7537834; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1227 +--
  1228 +
  1229 +ALTER TABLE ONLY material
  1230 + ADD CONSTRAINT fk15adc947a7537834 FOREIGN KEY (author_id) REFERENCES person(id);
  1231 +
  1232 +
  1233 +--
  1234 +-- Name: fk15adc947ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1235 +--
  1236 +
  1237 +ALTER TABLE ONLY material
  1238 + ADD CONSTRAINT fk15adc947ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1239 +
  1240 +
  1241 +--
  1242 +-- Name: fk1c3e4b288ea5370; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1243 +--
  1244 +
  1245 +ALTER TABLE ONLY criterion_criterionanswers
  1246 + ADD CONSTRAINT fk1c3e4b288ea5370 FOREIGN KEY (criterion_id) REFERENCES criterion(id);
  1247 +
  1248 +
  1249 +--
  1250 +-- Name: fk1c3e4b2c49525a3; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1251 +--
  1252 +
  1253 +ALTER TABLE ONLY criterion_criterionanswers
  1254 + ADD CONSTRAINT fk1c3e4b2c49525a3 FOREIGN KEY (answers_id) REFERENCES criterionanswers(id);
  1255 +
  1256 +
  1257 +--
  1258 +-- Name: fk21c012ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1259 +--
  1260 +
  1261 +ALTER TABLE ONLY game
  1262 + ADD CONSTRAINT fk21c012ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1263 +
  1264 +
  1265 +--
  1266 +-- Name: fk24a217aa39b57ec2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1267 +--
  1268 +
  1269 +ALTER TABLE ONLY evaluationrealized
  1270 + ADD CONSTRAINT fk24a217aa39b57ec2 FOREIGN KEY (evaluation_id) REFERENCES evaluation(id);
  1271 +
  1272 +
  1273 +--
  1274 +-- Name: fk24a217aa823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1275 +--
  1276 +
  1277 +ALTER TABLE ONLY evaluationrealized
  1278 + ADD CONSTRAINT fk24a217aa823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1279 +
  1280 +
  1281 +--
  1282 +-- Name: fk260bdfff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1283 +--
  1284 +
  1285 +ALTER TABLE ONLY poll
  1286 + ADD CONSTRAINT fk260bdfff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1287 +
  1288 +
  1289 +--
  1290 +-- Name: fk33e78f316c6b0f66; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1291 +--
  1292 +
  1293 +ALTER TABLE ONLY courseevaluation_commentary
  1294 + ADD CONSTRAINT fk33e78f316c6b0f66 FOREIGN KEY (commentaries_id) REFERENCES commentary(id);
  1295 +
  1296 +
  1297 +--
  1298 +-- Name: fk33e78f31ed65d464; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1299 +--
  1300 +
  1301 +ALTER TABLE ONLY courseevaluation_commentary
  1302 + ADD CONSTRAINT fk33e78f31ed65d464 FOREIGN KEY (courseevaluation_id) REFERENCES courseevaluation(id);
  1303 +
  1304 +
  1305 +--
  1306 +-- Name: fk34ef8014823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1307 +--
  1308 +
  1309 +ALTER TABLE ONLY delivery
  1310 + ADD CONSTRAINT fk34ef8014823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1311 +
  1312 +
  1313 +--
  1314 +-- Name: fk34ef8014a16e7a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1315 +--
  1316 +
  1317 +ALTER TABLE ONLY delivery
  1318 + ADD CONSTRAINT fk34ef8014a16e7a4 FOREIGN KEY (homework_id) REFERENCES homework(id);
  1319 +
  1320 +
  1321 +--
  1322 +-- Name: fk40e9d01ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1323 +--
  1324 +
  1325 +ALTER TABLE ONLY forum
  1326 + ADD CONSTRAINT fk40e9d01ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1327 +
  1328 +
  1329 +--
  1330 +-- Name: fk53fbe3afc72997b7; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1331 +--
  1332 +
  1333 +ALTER TABLE ONLY associationrealized
  1334 + ADD CONSTRAINT fk53fbe3afc72997b7 FOREIGN KEY (questionrealized_id) REFERENCES questionrealized(id);
  1335 +
  1336 +
  1337 +--
  1338 +-- Name: fk56da32dddbc23d07; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1339 +--
  1340 +
  1341 +ALTER TABLE ONLY courseevaluation_person
  1342 + ADD CONSTRAINT fk56da32dddbc23d07 FOREIGN KEY (students_id) REFERENCES person(id);
  1343 +
  1344 +
  1345 +--
  1346 +-- Name: fk56da32dded65d464; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1347 +--
  1348 +
  1349 +ALTER TABLE ONLY courseevaluation_person
  1350 + ADD CONSTRAINT fk56da32dded65d464 FOREIGN KEY (courseevaluation_id) REFERENCES courseevaluation(id);
  1351 +
  1352 +
  1353 +--
  1354 +-- Name: fk57aecf8d24818534; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1355 +--
  1356 +
  1357 +ALTER TABLE ONLY alternative
  1358 + ADD CONSTRAINT fk57aecf8d24818534 FOREIGN KEY (question_id) REFERENCES question(id);
  1359 +
  1360 +
  1361 +--
  1362 +-- Name: fk5af7f43c11d61984; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1363 +--
  1364 +
  1365 +ALTER TABLE ONLY coursescores
  1366 + ADD CONSTRAINT fk5af7f43c11d61984 FOREIGN KEY (student_id) REFERENCES person(id);
  1367 +
  1368 +
  1369 +--
  1370 +-- Name: fk5af7f43cff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1371 +--
  1372 +
  1373 +ALTER TABLE ONLY coursescores
  1374 + ADD CONSTRAINT fk5af7f43cff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1375 +
  1376 +
  1377 +--
  1378 +-- Name: fk5e3284616862da32; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1379 +--
  1380 +
  1381 +ALTER TABLE ONLY association
  1382 + ADD CONSTRAINT fk5e3284616862da32 FOREIGN KEY (questionassociation_id) REFERENCES question(id);
  1383 +
  1384 +
  1385 +--
  1386 +-- Name: fk752f2bde1f427644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1387 +--
  1388 +
  1389 +ALTER TABLE ONLY answer
  1390 + ADD CONSTRAINT fk752f2bde1f427644 FOREIGN KEY (poll_id) REFERENCES poll(id);
  1391 +
  1392 +
  1393 +--
  1394 +-- Name: fk752f2bde823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1395 +--
  1396 +
  1397 +ALTER TABLE ONLY answer
  1398 + ADD CONSTRAINT fk752f2bde823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1399 +
  1400 +
  1401 +--
  1402 +-- Name: fk784249c11f427644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1403 +--
  1404 +
  1405 +ALTER TABLE ONLY choice
  1406 + ADD CONSTRAINT fk784249c11f427644 FOREIGN KEY (poll_id) REFERENCES poll(id);
  1407 +
  1408 +
  1409 +--
  1410 +-- Name: fk78a7cc3b83dde8d0; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1411 +--
  1412 +
  1413 +ALTER TABLE ONLY course
  1414 + ADD CONSTRAINT fk78a7cc3b83dde8d0 FOREIGN KEY (professor_id) REFERENCES person(id);
  1415 +
  1416 +
  1417 +--
  1418 +-- Name: fk867521917f54daa1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1419 +--
  1420 +
  1421 +ALTER TABLE ONLY historylearningobject
  1422 + ADD CONSTRAINT fk867521917f54daa1 FOREIGN KEY (learning_object_id) REFERENCES learningobject(id);
  1423 +
  1424 +
  1425 +--
  1426 +-- Name: fk86752191823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1427 +--
  1428 +
  1429 +ALTER TABLE ONLY historylearningobject
  1430 + ADD CONSTRAINT fk86752191823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1431 +
  1432 +
  1433 +--
  1434 +-- Name: fk89b0928ca246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1435 +--
  1436 +
  1437 +ALTER TABLE ONLY module
  1438 + ADD CONSTRAINT fk89b0928ca246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1439 +
  1440 +
  1441 +--
  1442 +-- Name: fk8d28b1057f91492a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1443 +--
  1444 +
  1445 +ALTER TABLE ONLY openid
  1446 + ADD CONSTRAINT fk8d28b1057f91492a FOREIGN KEY (accessinfo_id) REFERENCES accessinfo(id);
  1447 +
  1448 +
  1449 +--
  1450 +-- Name: fk8e4887752188614a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1451 +--
  1452 +
  1453 +ALTER TABLE ONLY person
  1454 + ADD CONSTRAINT fk8e4887752188614a FOREIGN KEY (image_id) REFERENCES image(id);
  1455 +
  1456 +
  1457 +--
  1458 +-- Name: fk8e48877559d6cf33; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1459 +--
  1460 +
  1461 +ALTER TABLE ONLY person
  1462 + ADD CONSTRAINT fk8e48877559d6cf33 FOREIGN KEY (access_info_id) REFERENCES accessinfo(id);
  1463 +
  1464 +
  1465 +--
  1466 +-- Name: fk8e488775e65ce32a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1467 +--
  1468 +
  1469 +ALTER TABLE ONLY person
  1470 + ADD CONSTRAINT fk8e488775e65ce32a FOREIGN KEY (resume_id) REFERENCES resume(id);
  1471 +
  1472 +
  1473 +--
  1474 +-- Name: fk92ba7c24823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1475 +--
  1476 +
  1477 +ALTER TABLE ONLY userrequest
  1478 + ADD CONSTRAINT fk92ba7c24823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1479 +
  1480 +
  1481 +--
  1482 +-- Name: fk92ba7c24a246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1483 +--
  1484 +
  1485 +ALTER TABLE ONLY userrequest
  1486 + ADD CONSTRAINT fk92ba7c24a246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1487 +
  1488 +
  1489 +--
  1490 +-- Name: fk99c042db49a6ea84; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1491 +--
  1492 +
  1493 +ALTER TABLE ONLY alternativerealized
  1494 + ADD CONSTRAINT fk99c042db49a6ea84 FOREIGN KEY (questionrealized_id) REFERENCES questionrealized(id);
  1495 +
  1496 +
  1497 +--
  1498 +-- Name: fk99c042db97456112; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1499 +--
  1500 +
  1501 +ALTER TABLE ONLY alternativerealized
  1502 + ADD CONSTRAINT fk99c042db97456112 FOREIGN KEY (alternative_id) REFERENCES alternative(id);
  1503 +
  1504 +
  1505 +--
  1506 +-- Name: fk9c2397e7a7537834; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1507 +--
  1508 +
  1509 +ALTER TABLE ONLY message
  1510 + ADD CONSTRAINT fk9c2397e7a7537834 FOREIGN KEY (author_id) REFERENCES person(id);
  1511 +
  1512 +
  1513 +--
  1514 +-- Name: fk9c2397e7c475de70; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1515 +--
  1516 +
  1517 +ALTER TABLE ONLY message
  1518 + ADD CONSTRAINT fk9c2397e7c475de70 FOREIGN KEY (forum_id) REFERENCES forum(id);
  1519 +
  1520 +
  1521 +--
  1522 +-- Name: fk9f19801dff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1523 +--
  1524 +
  1525 +ALTER TABLE ONLY learningobject
  1526 + ADD CONSTRAINT fk9f19801dff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1527 +
  1528 +
  1529 +--
  1530 +-- Name: fka271969c5b17a68f; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1531 +--
  1532 +
  1533 +ALTER TABLE ONLY keywordsofcourse
  1534 + ADD CONSTRAINT fka271969c5b17a68f FOREIGN KEY (keywords_id) REFERENCES keyword(id);
  1535 +
  1536 +
  1537 +--
  1538 +-- Name: fka271969ca246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1539 +--
  1540 +
  1541 +ALTER TABLE ONLY keywordsofcourse
  1542 + ADD CONSTRAINT fka271969ca246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1543 +
  1544 +
  1545 +--
  1546 +-- Name: fka9fde35cff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1547 +--
  1548 +
  1549 +ALTER TABLE ONLY evaluation
  1550 + ADD CONSTRAINT fka9fde35cff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1551 +
  1552 +
  1553 +--
  1554 +-- Name: fkb1f68a5435ce4882; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1555 +--
  1556 +
  1557 +ALTER TABLE ONLY questionrealized
  1558 + ADD CONSTRAINT fkb1f68a5435ce4882 FOREIGN KEY (question_id) REFERENCES question(id);
  1559 +
  1560 +
  1561 +--
  1562 +-- Name: fkb1f68a5473cede12; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1563 +--
  1564 +
  1565 +ALTER TABLE ONLY questionrealized
  1566 + ADD CONSTRAINT fkb1f68a5473cede12 FOREIGN KEY (evaluationrealized_id) REFERENCES evaluationrealized(id);
  1567 +
  1568 +
  1569 +--
  1570 +-- Name: fkb71889c0a246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1571 +--
  1572 +
  1573 +ALTER TABLE ONLY course_coursescores
  1574 + ADD CONSTRAINT fkb71889c0a246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1575 +
  1576 +
  1577 +--
  1578 +-- Name: fkb71889c0d1da0a67; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1579 +--
  1580 +
  1581 +ALTER TABLE ONLY course_coursescores
  1582 + ADD CONSTRAINT fkb71889c0d1da0a67 FOREIGN KEY (studentsscores_id) REFERENCES coursescores(id);
  1583 +
  1584 +
  1585 +--
  1586 +-- Name: fkb72bfe85ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1587 +--
  1588 +
  1589 +ALTER TABLE ONLY externallink
  1590 + ADD CONSTRAINT fkb72bfe85ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1591 +
  1592 +
  1593 +--
  1594 +-- Name: fkbe5ca006a246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1595 +--
  1596 +
  1597 +ALTER TABLE ONLY question
  1598 + ADD CONSTRAINT fkbe5ca006a246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1599 +
  1600 +
  1601 +--
  1602 +-- Name: fkc6e06715ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1603 +--
  1604 +
  1605 +ALTER TABLE ONLY videoiriz
  1606 + ADD CONSTRAINT fkc6e06715ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1607 +
  1608 +
  1609 +--
  1610 +-- Name: fkdde91348ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1611 +--
  1612 +
  1613 +ALTER TABLE ONLY materialrequest
  1614 + ADD CONSTRAINT fkdde91348ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1615 +
  1616 +
  1617 +--
  1618 +-- Name: fke6ef9890ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1619 +--
  1620 +
  1621 +ALTER TABLE ONLY homework
  1622 + ADD CONSTRAINT fke6ef9890ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1623 +
  1624 +
  1625 +--
  1626 +-- Name: fkf8b89e1a823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1627 +--
  1628 +
  1629 +ALTER TABLE ONLY person_role_course
  1630 + ADD CONSTRAINT fkf8b89e1a823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1631 +
  1632 +
  1633 +--
  1634 +-- Name: fkf8b89e1a890ca6e4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1635 +--
  1636 +
  1637 +ALTER TABLE ONLY person_role_course
  1638 + ADD CONSTRAINT fkf8b89e1a890ca6e4 FOREIGN KEY (role_id) REFERENCES role(id);
  1639 +
  1640 +
  1641 +--
  1642 +-- Name: fkf8b89e1aa246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1643 +--
  1644 +
  1645 +ALTER TABLE ONLY person_role_course
  1646 + ADD CONSTRAINT fkf8b89e1aa246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1647 +
  1648 +
  1649 +--
  1650 +-- Name: fkfe0dea1982f6e1f2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1651 +--
  1652 +
  1653 +ALTER TABLE ONLY courseevaluation_criterion
  1654 + ADD CONSTRAINT fkfe0dea1982f6e1f2 FOREIGN KEY (criteria_id) REFERENCES criterion(id);
  1655 +
  1656 +
  1657 +--
  1658 +-- Name: fkfe0dea19ed65d464; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1659 +--
  1660 +
  1661 +ALTER TABLE ONLY courseevaluation_criterion
  1662 + ADD CONSTRAINT fkfe0dea19ed65d464 FOREIGN KEY (courseevaluation_id) REFERENCES courseevaluation(id);
  1663 +
  1664 +
  1665 +--
  1666 +-- Name: public; Type: ACL; Schema: -; Owner: postgres
  1667 +--
  1668 +
  1669 +REVOKE ALL ON SCHEMA public FROM PUBLIC;
  1670 +REVOKE ALL ON SCHEMA public FROM postgres;
  1671 +GRANT ALL ON SCHEMA public TO postgres;
  1672 +GRANT ALL ON SCHEMA public TO PUBLIC;
  1673 +
  1674 +
  1675 +--
  1676 +-- PostgreSQL database dump complete
  1677 +--
  1678 +
  1679 +ALTER TABLE game ADD COLUMN linkexterno boolean DEFAULT false;
  1680 +
  1681 +CREATE TABLE log
  1682 +(
  1683 + id integer NOT NULL,
  1684 + date timestamp without time zone,
  1685 + person_id integer,
  1686 + codigo integer,
  1687 + idobjeto integer,
  1688 + fases integer,
  1689 + tempo integer,
  1690 + pontuacao integer,
  1691 + metaalternativa integer,
  1692 + tamanhomensagem integer,
  1693 + CONSTRAINT log_primary_key PRIMARY KEY (id ),
  1694 + CONSTRAINT log_person_foreign_key FOREIGN KEY (person_id)
  1695 + REFERENCES person (id) MATCH SIMPLE
  1696 + ON UPDATE NO ACTION ON DELETE NO ACTION
  1697 +);
... ...
scripts/amadeuslms_web-v00.96.30.sql~ 0 → 100644
  1 +++ a/scripts/amadeuslms_web-v00.96.30.sql~
... ... @@ -0,0 +1,1697 @@
  1 +--
  2 +-- PostgreSQL database dump
  3 +--
  4 +
  5 +SET client_encoding = 'UTF8';
  6 +SET standard_conforming_strings = off;
  7 +SET check_function_bodies = false;
  8 +SET client_min_messages = warning;
  9 +SET escape_string_warning = off;
  10 +
  11 +--
  12 +-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
  13 +--
  14 +
  15 +CREATE PROCEDURAL LANGUAGE plpgsql;
  16 +
  17 +
  18 +ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;
  19 +
  20 +SET search_path = public, pg_catalog;
  21 +
  22 +SET default_tablespace = '';
  23 +
  24 +SET default_with_oids = false;
  25 +
  26 +--
  27 +-- Name: accessinfo; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  28 +--
  29 +
  30 +CREATE TABLE accessinfo (
  31 + id integer NOT NULL,
  32 + login character varying(255),
  33 + password character varying(255),
  34 + profile_type integer NOT NULL
  35 +);
  36 +
  37 +
  38 +ALTER TABLE public.accessinfo OWNER TO postgres;
  39 +
  40 +--
  41 +-- Name: alternative; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  42 +--
  43 +
  44 +CREATE TABLE alternative (
  45 + id integer NOT NULL,
  46 + correct boolean NOT NULL,
  47 + description character varying(8000),
  48 + question_id integer
  49 +);
  50 +
  51 +
  52 +ALTER TABLE public.alternative OWNER TO postgres;
  53 +
  54 +--
  55 +-- Name: alternativerealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  56 +--
  57 +
  58 +CREATE TABLE alternativerealized (
  59 + id integer NOT NULL,
  60 + answer boolean NOT NULL,
  61 + alternative_id integer,
  62 + questionrealized_id integer NOT NULL
  63 +);
  64 +
  65 +
  66 +ALTER TABLE public.alternativerealized OWNER TO postgres;
  67 +
  68 +--
  69 +-- Name: answer; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  70 +--
  71 +
  72 +CREATE TABLE answer (
  73 + id integer NOT NULL,
  74 + answerdate timestamp without time zone,
  75 + person_id integer,
  76 + poll_id integer NOT NULL,
  77 + "position" integer
  78 +);
  79 +
  80 +
  81 +ALTER TABLE public.answer OWNER TO postgres;
  82 +
  83 +--
  84 +-- Name: archive; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  85 +--
  86 +
  87 +CREATE TABLE archive (
  88 + id integer NOT NULL,
  89 + archive bytea
  90 +);
  91 +
  92 +
  93 +ALTER TABLE public.archive OWNER TO postgres;
  94 +
  95 +--
  96 +-- Name: association; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  97 +--
  98 +
  99 +CREATE TABLE association (
  100 + questionassociation_id integer NOT NULL,
  101 + value character varying(255) NOT NULL,
  102 + _key character varying(255) NOT NULL
  103 +);
  104 +
  105 +
  106 +ALTER TABLE public.association OWNER TO postgres;
  107 +
  108 +--
  109 +-- Name: associationrealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  110 +--
  111 +
  112 +CREATE TABLE associationrealized (
  113 + questionrealized_id integer NOT NULL,
  114 + value character varying(255) NOT NULL,
  115 + _key character varying(255) NOT NULL
  116 +);
  117 +
  118 +
  119 +ALTER TABLE public.associationrealized OWNER TO postgres;
  120 +
  121 +--
  122 +-- Name: choice; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  123 +--
  124 +
  125 +CREATE TABLE choice (
  126 + id integer NOT NULL,
  127 + alternative character varying(255),
  128 + percentage double precision NOT NULL,
  129 + votes integer NOT NULL,
  130 + poll_id integer NOT NULL,
  131 + "position" integer
  132 +);
  133 +
  134 +
  135 +ALTER TABLE public.choice OWNER TO postgres;
  136 +
  137 +--
  138 +-- Name: commentary; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  139 +--
  140 +
  141 +CREATE TABLE commentary (
  142 + id integer NOT NULL,
  143 + description character varying(255)
  144 +);
  145 +
  146 +
  147 +ALTER TABLE public.commentary OWNER TO postgres;
  148 +
  149 +--
  150 +-- Name: course; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  151 +--
  152 +
  153 +CREATE TABLE course (
  154 + id integer NOT NULL,
  155 + content character varying(2000),
  156 + creationdate timestamp without time zone,
  157 + finalcoursedate timestamp without time zone,
  158 + finalregistrationdate timestamp without time zone,
  159 + initialcoursedate timestamp without time zone,
  160 + initialregistrationdate timestamp without time zone,
  161 + maxamountstudents integer NOT NULL,
  162 + name character varying(255),
  163 + objectives character varying(2000),
  164 + professor_id integer
  165 +);
  166 +
  167 +
  168 +ALTER TABLE public.course OWNER TO postgres;
  169 +
  170 +--
  171 +-- Name: course_coursescores; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  172 +--
  173 +
  174 +CREATE TABLE course_coursescores (
  175 + course_id integer NOT NULL,
  176 + studentsscores_id integer NOT NULL
  177 +);
  178 +
  179 +
  180 +ALTER TABLE public.course_coursescores OWNER TO postgres;
  181 +
  182 +--
  183 +-- Name: courseevaluation; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  184 +--
  185 +
  186 +CREATE TABLE courseevaluation (
  187 + id integer NOT NULL,
  188 + initdate timestamp without time zone
  189 +);
  190 +
  191 +
  192 +ALTER TABLE public.courseevaluation OWNER TO postgres;
  193 +
  194 +--
  195 +-- Name: courseevaluation_commentary; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  196 +--
  197 +
  198 +CREATE TABLE courseevaluation_commentary (
  199 + courseevaluation_id integer NOT NULL,
  200 + commentaries_id integer NOT NULL,
  201 + commentary_position integer NOT NULL
  202 +);
  203 +
  204 +
  205 +ALTER TABLE public.courseevaluation_commentary OWNER TO postgres;
  206 +
  207 +--
  208 +-- Name: courseevaluation_criterion; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  209 +--
  210 +
  211 +CREATE TABLE courseevaluation_criterion (
  212 + courseevaluation_id integer NOT NULL,
  213 + criteria_id integer NOT NULL,
  214 + criterion_position integer NOT NULL
  215 +);
  216 +
  217 +
  218 +ALTER TABLE public.courseevaluation_criterion OWNER TO postgres;
  219 +
  220 +--
  221 +-- Name: courseevaluation_person; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  222 +--
  223 +
  224 +CREATE TABLE courseevaluation_person (
  225 + courseevaluation_id integer NOT NULL,
  226 + students_id integer NOT NULL
  227 +);
  228 +
  229 +
  230 +ALTER TABLE public.courseevaluation_person OWNER TO postgres;
  231 +
  232 +--
  233 +-- Name: coursescores; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  234 +--
  235 +
  236 +CREATE TABLE coursescores (
  237 + id integer NOT NULL,
  238 + coursescore double precision NOT NULL,
  239 + student_id integer,
  240 + module_id integer NOT NULL
  241 +);
  242 +
  243 +
  244 +ALTER TABLE public.coursescores OWNER TO postgres;
  245 +
  246 +--
  247 +-- Name: criterion; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  248 +--
  249 +
  250 +CREATE TABLE criterion (
  251 + id integer NOT NULL,
  252 + ctype integer
  253 +);
  254 +
  255 +
  256 +ALTER TABLE public.criterion OWNER TO postgres;
  257 +
  258 +--
  259 +-- Name: criterion_criterionanswers; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  260 +--
  261 +
  262 +CREATE TABLE criterion_criterionanswers (
  263 + criterion_id integer NOT NULL,
  264 + answers_id integer NOT NULL
  265 +);
  266 +
  267 +
  268 +ALTER TABLE public.criterion_criterionanswers OWNER TO postgres;
  269 +
  270 +--
  271 +-- Name: criterionanswers; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  272 +--
  273 +
  274 +CREATE TABLE criterionanswers (
  275 + id integer NOT NULL,
  276 + aalmostalwaysvotes integer NOT NULL,
  277 + aalmostnevervotes integer NOT NULL,
  278 + afrequentlyvotes integer NOT NULL,
  279 + ararelyvotes integer NOT NULL,
  280 + asometimesvotes integer NOT NULL,
  281 + atotalvotes integer NOT NULL,
  282 + dalmostalwaysvotes integer NOT NULL,
  283 + dalmostnevervotes integer NOT NULL,
  284 + dfrequentlyvotes integer NOT NULL,
  285 + drarelyvotes integer NOT NULL,
  286 + dsometimesvotes integer NOT NULL,
  287 + dtotalvotes integer NOT NULL
  288 +);
  289 +
  290 +
  291 +ALTER TABLE public.criterionanswers OWNER TO postgres;
  292 +
  293 +--
  294 +-- Name: delivery; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  295 +--
  296 +
  297 +CREATE TABLE delivery (
  298 + id integer NOT NULL,
  299 + archive bytea,
  300 + date timestamp without time zone,
  301 + person_id integer,
  302 + homework_id integer
  303 +);
  304 +
  305 +
  306 +ALTER TABLE public.delivery OWNER TO postgres;
  307 +
  308 +--
  309 +-- Name: evaluation; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  310 +--
  311 +
  312 +CREATE TABLE evaluation (
  313 + id integer NOT NULL,
  314 + afterdeadlineachieved boolean NOT NULL,
  315 + description character varying(8000),
  316 + finish timestamp without time zone,
  317 + start timestamp without time zone,
  318 + module_id integer
  319 +);
  320 +
  321 +
  322 +ALTER TABLE public.evaluation OWNER TO postgres;
  323 +
  324 +--
  325 +-- Name: evaluation_question; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  326 +--
  327 +
  328 +CREATE TABLE evaluation_question (
  329 + evaluation_id integer NOT NULL,
  330 + question_id integer NOT NULL
  331 +);
  332 +
  333 +
  334 +ALTER TABLE public.evaluation_question OWNER TO postgres;
  335 +
  336 +--
  337 +-- Name: evaluationrealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  338 +--
  339 +
  340 +CREATE TABLE evaluationrealized (
  341 + id integer NOT NULL,
  342 + correcteddate timestamp without time zone,
  343 + grade real NOT NULL,
  344 + realizeddate timestamp without time zone,
  345 + person_id integer,
  346 + evaluation_id integer NOT NULL
  347 +);
  348 +
  349 +
  350 +ALTER TABLE public.evaluationrealized OWNER TO postgres;
  351 +
  352 +--
  353 +-- Name: externallink; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  354 +--
  355 +
  356 +CREATE TABLE externallink (
  357 + id integer NOT NULL,
  358 + creationdate date,
  359 + description character varying(1000),
  360 + name character varying(255),
  361 + url character varying(500),
  362 + module_id integer NOT NULL
  363 +);
  364 +
  365 +
  366 +ALTER TABLE public.externallink OWNER TO postgres;
  367 +
  368 +--
  369 +-- Name: forum; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  370 +--
  371 +
  372 +CREATE TABLE forum (
  373 + id integer NOT NULL,
  374 + description character varying(9000),
  375 + creationdate timestamp without time zone,
  376 + name character varying(255),
  377 + module_id integer NOT NULL
  378 +);
  379 +
  380 +
  381 +ALTER TABLE public.forum OWNER TO postgres;
  382 +
  383 +--
  384 +-- Name: game; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  385 +--
  386 +
  387 +CREATE TABLE game (
  388 + id integer NOT NULL,
  389 + creationdate timestamp without time zone,
  390 + description character varying(255),
  391 + image bytea,
  392 + maxusers integer NOT NULL,
  393 + minusers integer NOT NULL,
  394 + name character varying(255),
  395 + url character varying(255),
  396 + module_id integer NOT NULL
  397 +);
  398 +
  399 +
  400 +
  401 +ALTER TABLE public.game OWNER TO postgres;
  402 +
  403 +--
  404 +-- Name: gapanswer; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  405 +--
  406 +
  407 +CREATE TABLE gapanswer (
  408 + questionrealized_id integer NOT NULL,
  409 + answer character varying(255) NOT NULL
  410 +);
  411 +
  412 +
  413 +ALTER TABLE public.gapanswer OWNER TO postgres;
  414 +
  415 +--
  416 +-- Name: hibernate_sequence; Type: SEQUENCE; Schema: public; Owner: postgres
  417 +--
  418 +
  419 +CREATE SEQUENCE hibernate_sequence
  420 + INCREMENT BY 1
  421 + NO MAXVALUE
  422 + NO MINVALUE
  423 + CACHE 1;
  424 +
  425 +
  426 +ALTER TABLE public.hibernate_sequence OWNER TO postgres;
  427 +
  428 +--
  429 +-- Name: historylearningobject; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  430 +--
  431 +
  432 +CREATE TABLE historylearningobject (
  433 + id integer NOT NULL,
  434 + dateaccess timestamp without time zone,
  435 + dateendaccess timestamp without time zone,
  436 + score character varying(255),
  437 + timeaccess time without time zone,
  438 + learning_object_id integer NOT NULL,
  439 + person_id integer NOT NULL
  440 +);
  441 +
  442 +
  443 +ALTER TABLE public.historylearningobject OWNER TO postgres;
  444 +
  445 +--
  446 +-- Name: homework; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  447 +--
  448 +
  449 +CREATE TABLE homework (
  450 + id integer NOT NULL,
  451 + allowpostponing timestamp without time zone,
  452 + deadline timestamp without time zone,
  453 + description character varying(255),
  454 + initdate timestamp without time zone,
  455 + name character varying(255),
  456 + module_id integer NOT NULL
  457 +);
  458 +
  459 +
  460 +ALTER TABLE public.homework OWNER TO postgres;
  461 +
  462 +--
  463 +-- Name: image; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  464 +--
  465 +
  466 +CREATE TABLE image (
  467 + id integer NOT NULL,
  468 + photo bytea
  469 +);
  470 +
  471 +
  472 +ALTER TABLE public.image OWNER TO postgres;
  473 +
  474 +--
  475 +-- Name: keyword; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  476 +--
  477 +
  478 +CREATE TABLE keyword (
  479 + id integer NOT NULL,
  480 + name character varying(255),
  481 + popularity integer NOT NULL
  482 +);
  483 +
  484 +
  485 +ALTER TABLE public.keyword OWNER TO postgres;
  486 +
  487 +--
  488 +-- Name: keywordsofcourse; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  489 +--
  490 +
  491 +CREATE TABLE keywordsofcourse (
  492 + course_id integer NOT NULL,
  493 + keywords_id integer NOT NULL
  494 +);
  495 +
  496 +
  497 +ALTER TABLE public.keywordsofcourse OWNER TO postgres;
  498 +
  499 +--
  500 +-- Name: learningobject; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  501 +--
  502 +
  503 +CREATE TABLE learningobject (
  504 + id integer NOT NULL,
  505 + creationdate timestamp without time zone,
  506 + description character varying(255),
  507 + name character varying(255),
  508 + url character varying(255),
  509 + module_id integer NOT NULL
  510 +);
  511 +
  512 +
  513 +ALTER TABLE public.learningobject OWNER TO postgres;
  514 +
  515 +--
  516 +-- Name: material; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  517 +--
  518 +
  519 +CREATE TABLE material (
  520 + id integer NOT NULL,
  521 + allowlatedeliveries boolean NOT NULL,
  522 + archivename character varying(255),
  523 + correcteddate timestamp without time zone,
  524 + extension character varying(255),
  525 + grade real,
  526 + creationdate timestamp without time zone,
  527 + author_id integer,
  528 + archive_id integer NOT NULL,
  529 + module_id integer NOT NULL,
  530 + request_id integer
  531 +);
  532 +
  533 +
  534 +ALTER TABLE public.material OWNER TO postgres;
  535 +
  536 +--
  537 +-- Name: materialrequest; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  538 +--
  539 +
  540 +CREATE TABLE materialrequest (
  541 + id integer NOT NULL,
  542 + allowlatedeliveries boolean NOT NULL,
  543 + deliverydate timestamp without time zone,
  544 + description character varying(255),
  545 + name character varying(255),
  546 + module_id integer NOT NULL,
  547 + creationdate timestamp without time zone
  548 +);
  549 +
  550 +
  551 +ALTER TABLE public.materialrequest OWNER TO postgres;
  552 +
  553 +--
  554 +-- Name: message; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  555 +--
  556 +
  557 +CREATE TABLE message (
  558 + id integer NOT NULL,
  559 + body character varying(2000),
  560 + date timestamp without time zone,
  561 + forum_id integer NOT NULL,
  562 + author_id integer,
  563 + "position" integer
  564 +);
  565 +
  566 +
  567 +ALTER TABLE public.message OWNER TO postgres;
  568 +
  569 +--
  570 +-- Name: module; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  571 +--
  572 +
  573 +CREATE TABLE module (
  574 + id integer NOT NULL,
  575 + description character varying(1500),
  576 + name character varying(255),
  577 + "position" integer NOT NULL,
  578 + visible boolean NOT NULL,
  579 + course_id integer NOT NULL
  580 +);
  581 +
  582 +
  583 +ALTER TABLE public.module OWNER TO postgres;
  584 +
  585 +--
  586 +-- Name: openid; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  587 +--
  588 +
  589 +CREATE TABLE openid (
  590 + id integer NOT NULL,
  591 + email character varying(255),
  592 + _identity character varying(255),
  593 + name character varying(255),
  594 + provideby character varying(255),
  595 + accessinfo_id integer NOT NULL
  596 +);
  597 +
  598 +
  599 +ALTER TABLE public.openid OWNER TO postgres;
  600 +
  601 +--
  602 +-- Name: person; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  603 +--
  604 +
  605 +CREATE TABLE person (
  606 + id integer NOT NULL,
  607 + birthdate timestamp without time zone,
  608 + city character varying(255),
  609 + cpf character varying(255),
  610 + email character varying(255),
  611 + gender character(1) NOT NULL,
  612 + name character varying(255),
  613 + phonenumber character varying(255),
  614 + state character varying(255),
  615 + access_info_id integer,
  616 + image_id integer,
  617 + resume_id integer
  618 +);
  619 +
  620 +
  621 +ALTER TABLE public.person OWNER TO postgres;
  622 +
  623 +--
  624 +-- Name: person_role_course; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  625 +--
  626 +
  627 +CREATE TABLE person_role_course (
  628 + id integer NOT NULL,
  629 + person_id integer,
  630 + course_id integer NOT NULL,
  631 + role_id integer
  632 +);
  633 +
  634 +
  635 +ALTER TABLE public.person_role_course OWNER TO postgres;
  636 +
  637 +--
  638 +-- Name: poll; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  639 +--
  640 +
  641 +CREATE TABLE poll (
  642 + id integer NOT NULL,
  643 + finishdate timestamp without time zone,
  644 + creationdate timestamp without time zone,
  645 + name character varying(255),
  646 + question character varying(255),
  647 + module_id integer NOT NULL
  648 +);
  649 +
  650 +
  651 +ALTER TABLE public.poll OWNER TO postgres;
  652 +
  653 +--
  654 +-- Name: question; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  655 +--
  656 +
  657 +CREATE TABLE question (
  658 + dtype character varying(31) NOT NULL,
  659 + id integer NOT NULL,
  660 + description character varying(8000),
  661 + course_id integer NOT NULL
  662 +);
  663 +
  664 +
  665 +ALTER TABLE public.question OWNER TO postgres;
  666 +
  667 +--
  668 +-- Name: questionrealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  669 +--
  670 +
  671 +CREATE TABLE questionrealized (
  672 + dtype character varying(31) NOT NULL,
  673 + id integer NOT NULL,
  674 + comment character varying(8000),
  675 + grade real NOT NULL,
  676 + answer character varying(8000),
  677 + question_id integer,
  678 + evaluationrealized_id integer NOT NULL
  679 +);
  680 +
  681 +
  682 +ALTER TABLE public.questionrealized OWNER TO postgres;
  683 +
  684 +--
  685 +-- Name: resume; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  686 +--
  687 +
  688 +CREATE TABLE resume (
  689 + id integer NOT NULL,
  690 + degree character varying(255),
  691 + description character varying(255),
  692 + instituition character varying(255),
  693 + year integer
  694 +);
  695 +
  696 +
  697 +ALTER TABLE public.resume OWNER TO postgres;
  698 +
  699 +--
  700 +-- Name: role; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  701 +--
  702 +
  703 +CREATE TABLE role (
  704 + id integer NOT NULL,
  705 + role_type integer NOT NULL
  706 +);
  707 +
  708 +
  709 +ALTER TABLE public.role OWNER TO postgres;
  710 +
  711 +--
  712 +-- Name: userrequest; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  713 +--
  714 +
  715 +CREATE TABLE userrequest (
  716 + id integer NOT NULL,
  717 + interest character varying(255),
  718 + status_type integer NOT NULL,
  719 + teachingrequest boolean NOT NULL,
  720 + userrequestdate timestamp without time zone,
  721 + course_id integer,
  722 + person_id integer
  723 +);
  724 +
  725 +
  726 +ALTER TABLE public.userrequest OWNER TO postgres;
  727 +
  728 +--
  729 +-- Name: videoiriz; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  730 +--
  731 +
  732 +CREATE TABLE videoiriz (
  733 + id integer NOT NULL,
  734 + description character varying(255),
  735 + name character varying(255),
  736 + uploaded boolean NOT NULL,
  737 + youtubeid character varying(255),
  738 + module_id integer NOT NULL,
  739 + creationdate timestamp without time zone
  740 +);
  741 +
  742 +
  743 +ALTER TABLE public.videoiriz OWNER TO postgres;
  744 +
  745 +--
  746 +-- Name: accessinfo_login_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  747 +--
  748 +
  749 +ALTER TABLE ONLY accessinfo
  750 + ADD CONSTRAINT accessinfo_login_key UNIQUE (login);
  751 +
  752 +
  753 +--
  754 +-- Name: accessinfo_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  755 +--
  756 +
  757 +ALTER TABLE ONLY accessinfo
  758 + ADD CONSTRAINT accessinfo_pkey PRIMARY KEY (id);
  759 +
  760 +
  761 +--
  762 +-- Name: alternative_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  763 +--
  764 +
  765 +ALTER TABLE ONLY alternative
  766 + ADD CONSTRAINT alternative_pkey PRIMARY KEY (id);
  767 +
  768 +
  769 +--
  770 +-- Name: alternativerealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  771 +--
  772 +
  773 +ALTER TABLE ONLY alternativerealized
  774 + ADD CONSTRAINT alternativerealized_pkey PRIMARY KEY (id);
  775 +
  776 +
  777 +--
  778 +-- Name: answer_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  779 +--
  780 +
  781 +ALTER TABLE ONLY answer
  782 + ADD CONSTRAINT answer_pkey PRIMARY KEY (id);
  783 +
  784 +
  785 +--
  786 +-- Name: archive_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  787 +--
  788 +
  789 +ALTER TABLE ONLY archive
  790 + ADD CONSTRAINT archive_pkey PRIMARY KEY (id);
  791 +
  792 +
  793 +--
  794 +-- Name: association_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  795 +--
  796 +
  797 +ALTER TABLE ONLY association
  798 + ADD CONSTRAINT association_pkey PRIMARY KEY (questionassociation_id, _key);
  799 +
  800 +
  801 +--
  802 +-- Name: associationrealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  803 +--
  804 +
  805 +ALTER TABLE ONLY associationrealized
  806 + ADD CONSTRAINT associationrealized_pkey PRIMARY KEY (questionrealized_id, _key);
  807 +
  808 +
  809 +--
  810 +-- Name: choice_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  811 +--
  812 +
  813 +ALTER TABLE ONLY choice
  814 + ADD CONSTRAINT choice_pkey PRIMARY KEY (id);
  815 +
  816 +
  817 +--
  818 +-- Name: commentary_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  819 +--
  820 +
  821 +ALTER TABLE ONLY commentary
  822 + ADD CONSTRAINT commentary_pkey PRIMARY KEY (id);
  823 +
  824 +
  825 +--
  826 +-- Name: course_coursescores_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  827 +--
  828 +
  829 +ALTER TABLE ONLY course_coursescores
  830 + ADD CONSTRAINT course_coursescores_pkey PRIMARY KEY (course_id, studentsscores_id);
  831 +
  832 +
  833 +--
  834 +-- Name: course_coursescores_studentsscores_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  835 +--
  836 +
  837 +ALTER TABLE ONLY course_coursescores
  838 + ADD CONSTRAINT course_coursescores_studentsscores_id_key UNIQUE (studentsscores_id);
  839 +
  840 +
  841 +--
  842 +-- Name: course_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  843 +--
  844 +
  845 +ALTER TABLE ONLY course
  846 + ADD CONSTRAINT course_pkey PRIMARY KEY (id);
  847 +
  848 +
  849 +--
  850 +-- Name: courseevaluation_commentary_commentaries_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  851 +--
  852 +
  853 +ALTER TABLE ONLY courseevaluation_commentary
  854 + ADD CONSTRAINT courseevaluation_commentary_commentaries_id_key UNIQUE (commentaries_id);
  855 +
  856 +
  857 +--
  858 +-- Name: courseevaluation_commentary_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  859 +--
  860 +
  861 +ALTER TABLE ONLY courseevaluation_commentary
  862 + ADD CONSTRAINT courseevaluation_commentary_pkey PRIMARY KEY (courseevaluation_id, commentary_position);
  863 +
  864 +
  865 +--
  866 +-- Name: courseevaluation_criterion_criteria_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  867 +--
  868 +
  869 +ALTER TABLE ONLY courseevaluation_criterion
  870 + ADD CONSTRAINT courseevaluation_criterion_criteria_id_key UNIQUE (criteria_id);
  871 +
  872 +
  873 +--
  874 +-- Name: courseevaluation_criterion_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  875 +--
  876 +
  877 +ALTER TABLE ONLY courseevaluation_criterion
  878 + ADD CONSTRAINT courseevaluation_criterion_pkey PRIMARY KEY (courseevaluation_id, criterion_position);
  879 +
  880 +
  881 +--
  882 +-- Name: courseevaluation_person_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  883 +--
  884 +
  885 +ALTER TABLE ONLY courseevaluation_person
  886 + ADD CONSTRAINT courseevaluation_person_pkey PRIMARY KEY (courseevaluation_id, students_id);
  887 +
  888 +
  889 +--
  890 +-- Name: courseevaluation_person_students_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  891 +--
  892 +
  893 +ALTER TABLE ONLY courseevaluation_person
  894 + ADD CONSTRAINT courseevaluation_person_students_id_key UNIQUE (students_id);
  895 +
  896 +
  897 +--
  898 +-- Name: courseevaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  899 +--
  900 +
  901 +ALTER TABLE ONLY courseevaluation
  902 + ADD CONSTRAINT courseevaluation_pkey PRIMARY KEY (id);
  903 +
  904 +
  905 +--
  906 +-- Name: coursescores_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  907 +--
  908 +
  909 +ALTER TABLE ONLY coursescores
  910 + ADD CONSTRAINT coursescores_pkey PRIMARY KEY (id);
  911 +
  912 +
  913 +--
  914 +-- Name: criterion_criterionanswers_answers_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  915 +--
  916 +
  917 +ALTER TABLE ONLY criterion_criterionanswers
  918 + ADD CONSTRAINT criterion_criterionanswers_answers_id_key UNIQUE (answers_id);
  919 +
  920 +
  921 +--
  922 +-- Name: criterion_criterionanswers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  923 +--
  924 +
  925 +ALTER TABLE ONLY criterion_criterionanswers
  926 + ADD CONSTRAINT criterion_criterionanswers_pkey PRIMARY KEY (criterion_id, answers_id);
  927 +
  928 +
  929 +--
  930 +-- Name: criterion_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  931 +--
  932 +
  933 +ALTER TABLE ONLY criterion
  934 + ADD CONSTRAINT criterion_pkey PRIMARY KEY (id);
  935 +
  936 +
  937 +--
  938 +-- Name: criterionanswers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  939 +--
  940 +
  941 +ALTER TABLE ONLY criterionanswers
  942 + ADD CONSTRAINT criterionanswers_pkey PRIMARY KEY (id);
  943 +
  944 +
  945 +--
  946 +-- Name: delivery_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  947 +--
  948 +
  949 +ALTER TABLE ONLY delivery
  950 + ADD CONSTRAINT delivery_pkey PRIMARY KEY (id);
  951 +
  952 +
  953 +--
  954 +-- Name: evaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  955 +--
  956 +
  957 +ALTER TABLE ONLY evaluation
  958 + ADD CONSTRAINT evaluation_pkey PRIMARY KEY (id);
  959 +
  960 +
  961 +--
  962 +-- Name: evaluationrealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  963 +--
  964 +
  965 +ALTER TABLE ONLY evaluationrealized
  966 + ADD CONSTRAINT evaluationrealized_pkey PRIMARY KEY (id);
  967 +
  968 +
  969 +--
  970 +-- Name: externallink_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  971 +--
  972 +
  973 +ALTER TABLE ONLY externallink
  974 + ADD CONSTRAINT externallink_pkey PRIMARY KEY (id);
  975 +
  976 +
  977 +--
  978 +-- Name: forum_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  979 +--
  980 +
  981 +ALTER TABLE ONLY forum
  982 + ADD CONSTRAINT forum_pkey PRIMARY KEY (id);
  983 +
  984 +
  985 +--
  986 +-- Name: game_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  987 +--
  988 +
  989 +ALTER TABLE ONLY game
  990 + ADD CONSTRAINT game_pkey PRIMARY KEY (id);
  991 +
  992 +
  993 +--
  994 +-- Name: historylearningobject_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  995 +--
  996 +
  997 +ALTER TABLE ONLY historylearningobject
  998 + ADD CONSTRAINT historylearningobject_pkey PRIMARY KEY (id);
  999 +
  1000 +
  1001 +--
  1002 +-- Name: homework_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1003 +--
  1004 +
  1005 +ALTER TABLE ONLY homework
  1006 + ADD CONSTRAINT homework_pkey PRIMARY KEY (id);
  1007 +
  1008 +
  1009 +--
  1010 +-- Name: image_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1011 +--
  1012 +
  1013 +ALTER TABLE ONLY image
  1014 + ADD CONSTRAINT image_pkey PRIMARY KEY (id);
  1015 +
  1016 +
  1017 +--
  1018 +-- Name: keyword_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1019 +--
  1020 +
  1021 +ALTER TABLE ONLY keyword
  1022 + ADD CONSTRAINT keyword_name_key UNIQUE (name);
  1023 +
  1024 +
  1025 +--
  1026 +-- Name: keyword_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1027 +--
  1028 +
  1029 +ALTER TABLE ONLY keyword
  1030 + ADD CONSTRAINT keyword_pkey PRIMARY KEY (id);
  1031 +
  1032 +
  1033 +--
  1034 +-- Name: keywordsofcourse_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1035 +--
  1036 +
  1037 +ALTER TABLE ONLY keywordsofcourse
  1038 + ADD CONSTRAINT keywordsofcourse_pkey PRIMARY KEY (course_id, keywords_id);
  1039 +
  1040 +
  1041 +--
  1042 +-- Name: learningobject_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1043 +--
  1044 +
  1045 +ALTER TABLE ONLY learningobject
  1046 + ADD CONSTRAINT learningobject_pkey PRIMARY KEY (id);
  1047 +
  1048 +
  1049 +--
  1050 +-- Name: material_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1051 +--
  1052 +
  1053 +ALTER TABLE ONLY material
  1054 + ADD CONSTRAINT material_pkey PRIMARY KEY (id);
  1055 +
  1056 +
  1057 +--
  1058 +-- Name: materialrequest_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1059 +--
  1060 +
  1061 +ALTER TABLE ONLY materialrequest
  1062 + ADD CONSTRAINT materialrequest_pkey PRIMARY KEY (id);
  1063 +
  1064 +
  1065 +--
  1066 +-- Name: message_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1067 +--
  1068 +
  1069 +ALTER TABLE ONLY message
  1070 + ADD CONSTRAINT message_pkey PRIMARY KEY (id);
  1071 +
  1072 +
  1073 +--
  1074 +-- Name: module_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1075 +--
  1076 +
  1077 +ALTER TABLE ONLY module
  1078 + ADD CONSTRAINT module_pkey PRIMARY KEY (id);
  1079 +
  1080 +
  1081 +--
  1082 +-- Name: openid_identity_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1083 +--
  1084 +
  1085 +ALTER TABLE ONLY openid
  1086 + ADD CONSTRAINT openid_identity_key UNIQUE (_identity);
  1087 +
  1088 +
  1089 +--
  1090 +-- Name: openid_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1091 +--
  1092 +
  1093 +ALTER TABLE ONLY openid
  1094 + ADD CONSTRAINT openid_pkey PRIMARY KEY (id);
  1095 +
  1096 +
  1097 +--
  1098 +-- Name: person_email_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1099 +--
  1100 +
  1101 +ALTER TABLE ONLY person
  1102 + ADD CONSTRAINT person_email_key UNIQUE (email);
  1103 +
  1104 +
  1105 +--
  1106 +-- Name: person_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1107 +--
  1108 +
  1109 +ALTER TABLE ONLY person
  1110 + ADD CONSTRAINT person_pkey PRIMARY KEY (id);
  1111 +
  1112 +
  1113 +--
  1114 +-- Name: person_role_course_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1115 +--
  1116 +
  1117 +ALTER TABLE ONLY person_role_course
  1118 + ADD CONSTRAINT person_role_course_pkey PRIMARY KEY (id);
  1119 +
  1120 +
  1121 +--
  1122 +-- Name: poll_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1123 +--
  1124 +
  1125 +ALTER TABLE ONLY poll
  1126 + ADD CONSTRAINT poll_pkey PRIMARY KEY (id);
  1127 +
  1128 +
  1129 +--
  1130 +-- Name: primarykeyconstraint; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1131 +--
  1132 +
  1133 +ALTER TABLE ONLY evaluation_question
  1134 + ADD CONSTRAINT primarykeyconstraint PRIMARY KEY (evaluation_id, question_id);
  1135 +
  1136 +
  1137 +--
  1138 +-- Name: question_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1139 +--
  1140 +
  1141 +ALTER TABLE ONLY question
  1142 + ADD CONSTRAINT question_pkey PRIMARY KEY (id);
  1143 +
  1144 +
  1145 +--
  1146 +-- Name: questionrealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1147 +--
  1148 +
  1149 +ALTER TABLE ONLY questionrealized
  1150 + ADD CONSTRAINT questionrealized_pkey PRIMARY KEY (id);
  1151 +
  1152 +
  1153 +--
  1154 +-- Name: resume_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1155 +--
  1156 +
  1157 +ALTER TABLE ONLY resume
  1158 + ADD CONSTRAINT resume_pkey PRIMARY KEY (id);
  1159 +
  1160 +
  1161 +--
  1162 +-- Name: role_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1163 +--
  1164 +
  1165 +ALTER TABLE ONLY role
  1166 + ADD CONSTRAINT role_pkey PRIMARY KEY (id);
  1167 +
  1168 +
  1169 +--
  1170 +-- Name: uniquekey_person_course; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1171 +--
  1172 +
  1173 +ALTER TABLE ONLY person_role_course
  1174 + ADD CONSTRAINT uniquekey_person_course UNIQUE (person_id, course_id);
  1175 +
  1176 +
  1177 +--
  1178 +-- Name: uniquekey_person_evaluation; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1179 +--
  1180 +
  1181 +ALTER TABLE ONLY evaluationrealized
  1182 + ADD CONSTRAINT uniquekey_person_evaluation UNIQUE (person_id, evaluation_id);
  1183 +
  1184 +
  1185 +--
  1186 +-- Name: userrequest_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1187 +--
  1188 +
  1189 +ALTER TABLE ONLY userrequest
  1190 + ADD CONSTRAINT userrequest_pkey PRIMARY KEY (id);
  1191 +
  1192 +
  1193 +--
  1194 +-- Name: videoiriz_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  1195 +--
  1196 +
  1197 +ALTER TABLE ONLY videoiriz
  1198 + ADD CONSTRAINT videoiriz_pkey PRIMARY KEY (id);
  1199 +
  1200 +
  1201 +--
  1202 +-- Name: fk1535e21440c3070c; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1203 +--
  1204 +
  1205 +ALTER TABLE ONLY gapanswer
  1206 + ADD CONSTRAINT fk1535e21440c3070c FOREIGN KEY (questionrealized_id) REFERENCES questionrealized(id);
  1207 +
  1208 +
  1209 +--
  1210 +-- Name: fk15adc9475d0e3509; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1211 +--
  1212 +
  1213 +ALTER TABLE ONLY material
  1214 + ADD CONSTRAINT fk15adc9475d0e3509 FOREIGN KEY (request_id) REFERENCES materialrequest(id);
  1215 +
  1216 +
  1217 +--
  1218 +-- Name: fk15adc947a6287150; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1219 +--
  1220 +
  1221 +ALTER TABLE ONLY material
  1222 + ADD CONSTRAINT fk15adc947a6287150 FOREIGN KEY (archive_id) REFERENCES archive(id);
  1223 +
  1224 +
  1225 +--
  1226 +-- Name: fk15adc947a7537834; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1227 +--
  1228 +
  1229 +ALTER TABLE ONLY material
  1230 + ADD CONSTRAINT fk15adc947a7537834 FOREIGN KEY (author_id) REFERENCES person(id);
  1231 +
  1232 +
  1233 +--
  1234 +-- Name: fk15adc947ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1235 +--
  1236 +
  1237 +ALTER TABLE ONLY material
  1238 + ADD CONSTRAINT fk15adc947ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1239 +
  1240 +
  1241 +--
  1242 +-- Name: fk1c3e4b288ea5370; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1243 +--
  1244 +
  1245 +ALTER TABLE ONLY criterion_criterionanswers
  1246 + ADD CONSTRAINT fk1c3e4b288ea5370 FOREIGN KEY (criterion_id) REFERENCES criterion(id);
  1247 +
  1248 +
  1249 +--
  1250 +-- Name: fk1c3e4b2c49525a3; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1251 +--
  1252 +
  1253 +ALTER TABLE ONLY criterion_criterionanswers
  1254 + ADD CONSTRAINT fk1c3e4b2c49525a3 FOREIGN KEY (answers_id) REFERENCES criterionanswers(id);
  1255 +
  1256 +
  1257 +--
  1258 +-- Name: fk21c012ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1259 +--
  1260 +
  1261 +ALTER TABLE ONLY game
  1262 + ADD CONSTRAINT fk21c012ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1263 +
  1264 +
  1265 +--
  1266 +-- Name: fk24a217aa39b57ec2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1267 +--
  1268 +
  1269 +ALTER TABLE ONLY evaluationrealized
  1270 + ADD CONSTRAINT fk24a217aa39b57ec2 FOREIGN KEY (evaluation_id) REFERENCES evaluation(id);
  1271 +
  1272 +
  1273 +--
  1274 +-- Name: fk24a217aa823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1275 +--
  1276 +
  1277 +ALTER TABLE ONLY evaluationrealized
  1278 + ADD CONSTRAINT fk24a217aa823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1279 +
  1280 +
  1281 +--
  1282 +-- Name: fk260bdfff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1283 +--
  1284 +
  1285 +ALTER TABLE ONLY poll
  1286 + ADD CONSTRAINT fk260bdfff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1287 +
  1288 +
  1289 +--
  1290 +-- Name: fk33e78f316c6b0f66; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1291 +--
  1292 +
  1293 +ALTER TABLE ONLY courseevaluation_commentary
  1294 + ADD CONSTRAINT fk33e78f316c6b0f66 FOREIGN KEY (commentaries_id) REFERENCES commentary(id);
  1295 +
  1296 +
  1297 +--
  1298 +-- Name: fk33e78f31ed65d464; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1299 +--
  1300 +
  1301 +ALTER TABLE ONLY courseevaluation_commentary
  1302 + ADD CONSTRAINT fk33e78f31ed65d464 FOREIGN KEY (courseevaluation_id) REFERENCES courseevaluation(id);
  1303 +
  1304 +
  1305 +--
  1306 +-- Name: fk34ef8014823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1307 +--
  1308 +
  1309 +ALTER TABLE ONLY delivery
  1310 + ADD CONSTRAINT fk34ef8014823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1311 +
  1312 +
  1313 +--
  1314 +-- Name: fk34ef8014a16e7a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1315 +--
  1316 +
  1317 +ALTER TABLE ONLY delivery
  1318 + ADD CONSTRAINT fk34ef8014a16e7a4 FOREIGN KEY (homework_id) REFERENCES homework(id);
  1319 +
  1320 +
  1321 +--
  1322 +-- Name: fk40e9d01ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1323 +--
  1324 +
  1325 +ALTER TABLE ONLY forum
  1326 + ADD CONSTRAINT fk40e9d01ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1327 +
  1328 +
  1329 +--
  1330 +-- Name: fk53fbe3afc72997b7; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1331 +--
  1332 +
  1333 +ALTER TABLE ONLY associationrealized
  1334 + ADD CONSTRAINT fk53fbe3afc72997b7 FOREIGN KEY (questionrealized_id) REFERENCES questionrealized(id);
  1335 +
  1336 +
  1337 +--
  1338 +-- Name: fk56da32dddbc23d07; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1339 +--
  1340 +
  1341 +ALTER TABLE ONLY courseevaluation_person
  1342 + ADD CONSTRAINT fk56da32dddbc23d07 FOREIGN KEY (students_id) REFERENCES person(id);
  1343 +
  1344 +
  1345 +--
  1346 +-- Name: fk56da32dded65d464; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1347 +--
  1348 +
  1349 +ALTER TABLE ONLY courseevaluation_person
  1350 + ADD CONSTRAINT fk56da32dded65d464 FOREIGN KEY (courseevaluation_id) REFERENCES courseevaluation(id);
  1351 +
  1352 +
  1353 +--
  1354 +-- Name: fk57aecf8d24818534; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1355 +--
  1356 +
  1357 +ALTER TABLE ONLY alternative
  1358 + ADD CONSTRAINT fk57aecf8d24818534 FOREIGN KEY (question_id) REFERENCES question(id);
  1359 +
  1360 +
  1361 +--
  1362 +-- Name: fk5af7f43c11d61984; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1363 +--
  1364 +
  1365 +ALTER TABLE ONLY coursescores
  1366 + ADD CONSTRAINT fk5af7f43c11d61984 FOREIGN KEY (student_id) REFERENCES person(id);
  1367 +
  1368 +
  1369 +--
  1370 +-- Name: fk5af7f43cff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1371 +--
  1372 +
  1373 +ALTER TABLE ONLY coursescores
  1374 + ADD CONSTRAINT fk5af7f43cff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1375 +
  1376 +
  1377 +--
  1378 +-- Name: fk5e3284616862da32; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1379 +--
  1380 +
  1381 +ALTER TABLE ONLY association
  1382 + ADD CONSTRAINT fk5e3284616862da32 FOREIGN KEY (questionassociation_id) REFERENCES question(id);
  1383 +
  1384 +
  1385 +--
  1386 +-- Name: fk752f2bde1f427644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1387 +--
  1388 +
  1389 +ALTER TABLE ONLY answer
  1390 + ADD CONSTRAINT fk752f2bde1f427644 FOREIGN KEY (poll_id) REFERENCES poll(id);
  1391 +
  1392 +
  1393 +--
  1394 +-- Name: fk752f2bde823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1395 +--
  1396 +
  1397 +ALTER TABLE ONLY answer
  1398 + ADD CONSTRAINT fk752f2bde823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1399 +
  1400 +
  1401 +--
  1402 +-- Name: fk784249c11f427644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1403 +--
  1404 +
  1405 +ALTER TABLE ONLY choice
  1406 + ADD CONSTRAINT fk784249c11f427644 FOREIGN KEY (poll_id) REFERENCES poll(id);
  1407 +
  1408 +
  1409 +--
  1410 +-- Name: fk78a7cc3b83dde8d0; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1411 +--
  1412 +
  1413 +ALTER TABLE ONLY course
  1414 + ADD CONSTRAINT fk78a7cc3b83dde8d0 FOREIGN KEY (professor_id) REFERENCES person(id);
  1415 +
  1416 +
  1417 +--
  1418 +-- Name: fk867521917f54daa1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1419 +--
  1420 +
  1421 +ALTER TABLE ONLY historylearningobject
  1422 + ADD CONSTRAINT fk867521917f54daa1 FOREIGN KEY (learning_object_id) REFERENCES learningobject(id);
  1423 +
  1424 +
  1425 +--
  1426 +-- Name: fk86752191823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1427 +--
  1428 +
  1429 +ALTER TABLE ONLY historylearningobject
  1430 + ADD CONSTRAINT fk86752191823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1431 +
  1432 +
  1433 +--
  1434 +-- Name: fk89b0928ca246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1435 +--
  1436 +
  1437 +ALTER TABLE ONLY module
  1438 + ADD CONSTRAINT fk89b0928ca246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1439 +
  1440 +
  1441 +--
  1442 +-- Name: fk8d28b1057f91492a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1443 +--
  1444 +
  1445 +ALTER TABLE ONLY openid
  1446 + ADD CONSTRAINT fk8d28b1057f91492a FOREIGN KEY (accessinfo_id) REFERENCES accessinfo(id);
  1447 +
  1448 +
  1449 +--
  1450 +-- Name: fk8e4887752188614a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1451 +--
  1452 +
  1453 +ALTER TABLE ONLY person
  1454 + ADD CONSTRAINT fk8e4887752188614a FOREIGN KEY (image_id) REFERENCES image(id);
  1455 +
  1456 +
  1457 +--
  1458 +-- Name: fk8e48877559d6cf33; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1459 +--
  1460 +
  1461 +ALTER TABLE ONLY person
  1462 + ADD CONSTRAINT fk8e48877559d6cf33 FOREIGN KEY (access_info_id) REFERENCES accessinfo(id);
  1463 +
  1464 +
  1465 +--
  1466 +-- Name: fk8e488775e65ce32a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1467 +--
  1468 +
  1469 +ALTER TABLE ONLY person
  1470 + ADD CONSTRAINT fk8e488775e65ce32a FOREIGN KEY (resume_id) REFERENCES resume(id);
  1471 +
  1472 +
  1473 +--
  1474 +-- Name: fk92ba7c24823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1475 +--
  1476 +
  1477 +ALTER TABLE ONLY userrequest
  1478 + ADD CONSTRAINT fk92ba7c24823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1479 +
  1480 +
  1481 +--
  1482 +-- Name: fk92ba7c24a246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1483 +--
  1484 +
  1485 +ALTER TABLE ONLY userrequest
  1486 + ADD CONSTRAINT fk92ba7c24a246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1487 +
  1488 +
  1489 +--
  1490 +-- Name: fk99c042db49a6ea84; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1491 +--
  1492 +
  1493 +ALTER TABLE ONLY alternativerealized
  1494 + ADD CONSTRAINT fk99c042db49a6ea84 FOREIGN KEY (questionrealized_id) REFERENCES questionrealized(id);
  1495 +
  1496 +
  1497 +--
  1498 +-- Name: fk99c042db97456112; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1499 +--
  1500 +
  1501 +ALTER TABLE ONLY alternativerealized
  1502 + ADD CONSTRAINT fk99c042db97456112 FOREIGN KEY (alternative_id) REFERENCES alternative(id);
  1503 +
  1504 +
  1505 +--
  1506 +-- Name: fk9c2397e7a7537834; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1507 +--
  1508 +
  1509 +ALTER TABLE ONLY message
  1510 + ADD CONSTRAINT fk9c2397e7a7537834 FOREIGN KEY (author_id) REFERENCES person(id);
  1511 +
  1512 +
  1513 +--
  1514 +-- Name: fk9c2397e7c475de70; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1515 +--
  1516 +
  1517 +ALTER TABLE ONLY message
  1518 + ADD CONSTRAINT fk9c2397e7c475de70 FOREIGN KEY (forum_id) REFERENCES forum(id);
  1519 +
  1520 +
  1521 +--
  1522 +-- Name: fk9f19801dff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1523 +--
  1524 +
  1525 +ALTER TABLE ONLY learningobject
  1526 + ADD CONSTRAINT fk9f19801dff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1527 +
  1528 +
  1529 +--
  1530 +-- Name: fka271969c5b17a68f; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1531 +--
  1532 +
  1533 +ALTER TABLE ONLY keywordsofcourse
  1534 + ADD CONSTRAINT fka271969c5b17a68f FOREIGN KEY (keywords_id) REFERENCES keyword(id);
  1535 +
  1536 +
  1537 +--
  1538 +-- Name: fka271969ca246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1539 +--
  1540 +
  1541 +ALTER TABLE ONLY keywordsofcourse
  1542 + ADD CONSTRAINT fka271969ca246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1543 +
  1544 +
  1545 +--
  1546 +-- Name: fka9fde35cff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1547 +--
  1548 +
  1549 +ALTER TABLE ONLY evaluation
  1550 + ADD CONSTRAINT fka9fde35cff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1551 +
  1552 +
  1553 +--
  1554 +-- Name: fkb1f68a5435ce4882; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1555 +--
  1556 +
  1557 +ALTER TABLE ONLY questionrealized
  1558 + ADD CONSTRAINT fkb1f68a5435ce4882 FOREIGN KEY (question_id) REFERENCES question(id);
  1559 +
  1560 +
  1561 +--
  1562 +-- Name: fkb1f68a5473cede12; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1563 +--
  1564 +
  1565 +ALTER TABLE ONLY questionrealized
  1566 + ADD CONSTRAINT fkb1f68a5473cede12 FOREIGN KEY (evaluationrealized_id) REFERENCES evaluationrealized(id);
  1567 +
  1568 +
  1569 +--
  1570 +-- Name: fkb71889c0a246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1571 +--
  1572 +
  1573 +ALTER TABLE ONLY course_coursescores
  1574 + ADD CONSTRAINT fkb71889c0a246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1575 +
  1576 +
  1577 +--
  1578 +-- Name: fkb71889c0d1da0a67; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1579 +--
  1580 +
  1581 +ALTER TABLE ONLY course_coursescores
  1582 + ADD CONSTRAINT fkb71889c0d1da0a67 FOREIGN KEY (studentsscores_id) REFERENCES coursescores(id);
  1583 +
  1584 +
  1585 +--
  1586 +-- Name: fkb72bfe85ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1587 +--
  1588 +
  1589 +ALTER TABLE ONLY externallink
  1590 + ADD CONSTRAINT fkb72bfe85ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1591 +
  1592 +
  1593 +--
  1594 +-- Name: fkbe5ca006a246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1595 +--
  1596 +
  1597 +ALTER TABLE ONLY question
  1598 + ADD CONSTRAINT fkbe5ca006a246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1599 +
  1600 +
  1601 +--
  1602 +-- Name: fkc6e06715ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1603 +--
  1604 +
  1605 +ALTER TABLE ONLY videoiriz
  1606 + ADD CONSTRAINT fkc6e06715ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1607 +
  1608 +
  1609 +--
  1610 +-- Name: fkdde91348ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1611 +--
  1612 +
  1613 +ALTER TABLE ONLY materialrequest
  1614 + ADD CONSTRAINT fkdde91348ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1615 +
  1616 +
  1617 +--
  1618 +-- Name: fke6ef9890ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1619 +--
  1620 +
  1621 +ALTER TABLE ONLY homework
  1622 + ADD CONSTRAINT fke6ef9890ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id);
  1623 +
  1624 +
  1625 +--
  1626 +-- Name: fkf8b89e1a823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1627 +--
  1628 +
  1629 +ALTER TABLE ONLY person_role_course
  1630 + ADD CONSTRAINT fkf8b89e1a823a322a FOREIGN KEY (person_id) REFERENCES person(id);
  1631 +
  1632 +
  1633 +--
  1634 +-- Name: fkf8b89e1a890ca6e4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1635 +--
  1636 +
  1637 +ALTER TABLE ONLY person_role_course
  1638 + ADD CONSTRAINT fkf8b89e1a890ca6e4 FOREIGN KEY (role_id) REFERENCES role(id);
  1639 +
  1640 +
  1641 +--
  1642 +-- Name: fkf8b89e1aa246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1643 +--
  1644 +
  1645 +ALTER TABLE ONLY person_role_course
  1646 + ADD CONSTRAINT fkf8b89e1aa246b644 FOREIGN KEY (course_id) REFERENCES course(id);
  1647 +
  1648 +
  1649 +--
  1650 +-- Name: fkfe0dea1982f6e1f2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1651 +--
  1652 +
  1653 +ALTER TABLE ONLY courseevaluation_criterion
  1654 + ADD CONSTRAINT fkfe0dea1982f6e1f2 FOREIGN KEY (criteria_id) REFERENCES criterion(id);
  1655 +
  1656 +
  1657 +--
  1658 +-- Name: fkfe0dea19ed65d464; Type: FK CONSTRAINT; Schema: public; Owner: postgres
  1659 +--
  1660 +
  1661 +ALTER TABLE ONLY courseevaluation_criterion
  1662 + ADD CONSTRAINT fkfe0dea19ed65d464 FOREIGN KEY (courseevaluation_id) REFERENCES courseevaluation(id);
  1663 +
  1664 +
  1665 +--
  1666 +-- Name: public; Type: ACL; Schema: -; Owner: postgres
  1667 +--
  1668 +
  1669 +REVOKE ALL ON SCHEMA public FROM PUBLIC;
  1670 +REVOKE ALL ON SCHEMA public FROM postgres;
  1671 +GRANT ALL ON SCHEMA public TO postgres;
  1672 +GRANT ALL ON SCHEMA public TO PUBLIC;
  1673 +
  1674 +
  1675 +--
  1676 +-- PostgreSQL database dump complete
  1677 +--
  1678 +
  1679 +ALTER TABLE game ADD COLUMN linkexterno boolean DEFAULT false;
  1680 +
  1681 +CREATE TABLE log
  1682 +(
  1683 + id integer NOT NULL,
  1684 + date timestamp without time zone,
  1685 + person_id integer,
  1686 + codigo integer,
  1687 + idobjeto integer,
  1688 + fases integer,
  1689 + tempo integer,
  1690 + pontuacao integer,
  1691 + metaalternativa integer,
  1692 + tamanhomensagem integer,
  1693 + CONSTRAINT log_primary_key PRIMARY KEY (id ),
  1694 + CONSTRAINT log_person_foreign_key FOREIGN KEY (person_id)
  1695 + REFERENCES person (id) MATCH SIMPLE
  1696 + ON UPDATE NO ACTION ON DELETE NO ACTION
  1697 +);
... ...