Fix db and tests
This commit is contained in:
parent
d555c74e21
commit
495746d6a1
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -4186,6 +4186,7 @@ dependencies = [
|
|||||||
name = "squadron-contract"
|
name = "squadron-contract"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"async-trait",
|
||||||
"bincode",
|
"bincode",
|
||||||
"chrono",
|
"chrono",
|
||||||
"deadpool-redis",
|
"deadpool-redis",
|
||||||
|
@ -207,7 +207,6 @@ mod tests {
|
|||||||
#[actix_web::test]
|
#[actix_web::test]
|
||||||
async fn bad_account_id() {
|
async fn bad_account_id() {
|
||||||
create_app!(app, session, db);
|
create_app!(app, session, db);
|
||||||
let _user = create_user(db, "valid_extract_user", "QWEqwwe123@#$").await;
|
|
||||||
let pair = session
|
let pair = session
|
||||||
.store(
|
.store(
|
||||||
AppClaims {
|
AppClaims {
|
||||||
@ -245,24 +244,6 @@ mod tests {
|
|||||||
#[actix_web::test]
|
#[actix_web::test]
|
||||||
async fn no_token() {
|
async fn no_token() {
|
||||||
create_app!(app, session, db);
|
create_app!(app, session, db);
|
||||||
let user = create_user(db, "valid_extract_user", "QWEqwwe123@#$").await;
|
|
||||||
let _pair = session
|
|
||||||
.store(
|
|
||||||
AppClaims {
|
|
||||||
expiration_time: (chrono::Utc::now() + chrono::Duration::days(100))
|
|
||||||
.timestamp_millis(),
|
|
||||||
issued_at: 0,
|
|
||||||
subject: "999999999".into(),
|
|
||||||
audience: session::Audience::Web,
|
|
||||||
jwt_id: Uuid::new_v4(),
|
|
||||||
account_id: user.id,
|
|
||||||
not_before: 0,
|
|
||||||
},
|
|
||||||
JwtTtl::new(actix_jwt_session::Duration::days(9999)),
|
|
||||||
RefreshTtl::new(actix_jwt_session::Duration::days(9999)),
|
|
||||||
)
|
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
let req = test::TestRequest::default()
|
let req = test::TestRequest::default()
|
||||||
// .insert_header((JWT_HEADER_NAME, pair.jwt.encode().unwrap()))
|
// .insert_header((JWT_HEADER_NAME, pair.jwt.encode().unwrap()))
|
||||||
.uri("/test")
|
.uri("/test")
|
||||||
|
@ -243,14 +243,18 @@ pub struct EmailAllowComment {
|
|||||||
pub comment_after_domain_part: Option<String>,
|
pub comment_after_domain_part: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn random_password() -> String {
|
pub fn random_hex(len: usize) -> String {
|
||||||
rand::thread_rng()
|
rand::thread_rng()
|
||||||
.sample_iter(rand::distributions::Alphanumeric)
|
.sample_iter(rand::distributions::Alphanumeric)
|
||||||
.take(30)
|
.take(len)
|
||||||
.map(char::from)
|
.map(char::from)
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn random_password() -> String {
|
||||||
|
random_hex(30)
|
||||||
|
}
|
||||||
|
|
||||||
pub mod password {
|
pub mod password {
|
||||||
const HAS_NUM: u8 = 1;
|
const HAS_NUM: u8 = 1;
|
||||||
const HAS_UPPER: u8 = 1 << 1;
|
const HAS_UPPER: u8 = 1 << 1;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
use actix_jwt_session::Authenticated;
|
|
||||||
use actix_web::web::{Data, Json};
|
use actix_web::web::{Data, Json};
|
||||||
use actix_web::{post, HttpResponse};
|
use actix_web::{post, HttpResponse};
|
||||||
use sea_orm::{DatabaseConnection, DatabaseTransaction, EntityTrait, Set};
|
use sea_orm::{DatabaseConnection, DatabaseTransaction, EntityTrait, Set};
|
||||||
@ -6,9 +5,8 @@ use serde_json::json;
|
|||||||
use tracing::warn;
|
use tracing::warn;
|
||||||
|
|
||||||
use super::password::*;
|
use super::password::*;
|
||||||
use crate::extractors::RequireInstanceConfigured;
|
use crate::extractors::{RequireUser, *};
|
||||||
use crate::models::{Error, JsonError, JsonErrorDetails};
|
use crate::models::{Error, JsonError, JsonErrorDetails};
|
||||||
use crate::session::AppClaims;
|
|
||||||
use crate::utils::SetPassword;
|
use crate::utils::SetPassword;
|
||||||
use crate::{db_commit, db_rollback, db_t, utils};
|
use crate::{db_commit, db_rollback, db_t, utils};
|
||||||
|
|
||||||
@ -23,13 +21,13 @@ struct Input {
|
|||||||
#[post("/users/me/change-password")]
|
#[post("/users/me/change-password")]
|
||||||
pub async fn change_password(
|
pub async fn change_password(
|
||||||
_: RequireInstanceConfigured,
|
_: RequireInstanceConfigured,
|
||||||
|
user: RequireUser,
|
||||||
input: Json<Input>,
|
input: Json<Input>,
|
||||||
auth: Authenticated<AppClaims>,
|
|
||||||
db: Data<DatabaseConnection>,
|
db: Data<DatabaseConnection>,
|
||||||
) -> Result<HttpResponse, JsonErrorDetails<PassValidity>> {
|
) -> Result<HttpResponse, JsonErrorDetails<PassValidity>> {
|
||||||
let mut t = db_t!(db)?;
|
let mut t = db_t!(db)?;
|
||||||
|
|
||||||
match try_change_password(input, auth, &mut t).await {
|
match try_change_password(input, user, &mut t).await {
|
||||||
Ok(r) => {
|
Ok(r) => {
|
||||||
db_commit!(t)?;
|
db_commit!(t)?;
|
||||||
Ok(r)
|
Ok(r)
|
||||||
@ -44,18 +42,9 @@ pub async fn change_password(
|
|||||||
|
|
||||||
async fn try_change_password(
|
async fn try_change_password(
|
||||||
input: Json<Input>,
|
input: Json<Input>,
|
||||||
auth: Authenticated<AppClaims>,
|
user: RequireUser,
|
||||||
t: &mut DatabaseTransaction,
|
t: &mut DatabaseTransaction,
|
||||||
) -> Result<HttpResponse, JsonErrorDetails<PassValidity>> {
|
) -> Result<HttpResponse, JsonErrorDetails<PassValidity>> {
|
||||||
let user = entities::prelude::Users::find_by_id(auth.account_id())
|
|
||||||
.one(&mut *t)
|
|
||||||
.await
|
|
||||||
.map_err(|e| {
|
|
||||||
tracing::error!("Failed to find user while change password: {e}");
|
|
||||||
Error::DatabaseError
|
|
||||||
})?
|
|
||||||
.ok_or(Error::UserRequired)?;
|
|
||||||
|
|
||||||
let input = input.into_inner();
|
let input = input.into_inner();
|
||||||
if input.new_password != input.confirm_password {
|
if input.new_password != input.confirm_password {
|
||||||
return Err(JsonError::new(
|
return Err(JsonError::new(
|
||||||
@ -109,6 +98,7 @@ mod tests {
|
|||||||
use tracing_test::traced_test;
|
use tracing_test::traced_test;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
|
use super::super::*;
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::session;
|
use crate::session;
|
||||||
|
|
||||||
@ -163,7 +153,16 @@ mod tests {
|
|||||||
}
|
}
|
||||||
ActiveModel {
|
ActiveModel {
|
||||||
instance_name: Set("Plan Free".into()),
|
instance_name: Set("Plan Free".into()),
|
||||||
|
is_telemetry_enabled: Set(true),
|
||||||
|
is_support_required: Set(true),
|
||||||
is_setup_done: Set(true),
|
is_setup_done: Set(true),
|
||||||
|
is_signup_screen_visited: Set(true),
|
||||||
|
is_verified: Set(true),
|
||||||
|
user_count: Set(0),
|
||||||
|
instance_id: Set(random_hex(12)),
|
||||||
|
api_key: Set(random_hex(8)),
|
||||||
|
version: Set(env!("CARGO_PKG_VERSION").to_string()),
|
||||||
|
last_checked_at: Set(chrono::Utc::now().fixed_offset()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
.save(&**db)
|
.save(&**db)
|
||||||
@ -176,7 +175,6 @@ mod tests {
|
|||||||
user_name: &str,
|
user_name: &str,
|
||||||
pass: &str,
|
pass: &str,
|
||||||
) -> entities::users::Model {
|
) -> entities::users::Model {
|
||||||
use entities::prelude::Users;
|
|
||||||
use entities::users::*;
|
use entities::users::*;
|
||||||
use sea_orm::*;
|
use sea_orm::*;
|
||||||
|
|
||||||
@ -264,7 +262,7 @@ mod tests {
|
|||||||
|
|
||||||
let resp = test::call_service(&app, req).await;
|
let resp = test::call_service(&app, req).await;
|
||||||
|
|
||||||
assert_eq!(resp.status(), StatusCode::BAD_REQUEST);
|
assert_eq!(resp.status(), StatusCode::UNAUTHORIZED);
|
||||||
|
|
||||||
let body = resp.into_body();
|
let body = resp.into_body();
|
||||||
let bytes = String::from_utf8(to_bytes(body).await.unwrap()[..].to_vec()).unwrap();
|
let bytes = String::from_utf8(to_bytes(body).await.unwrap()[..].to_vec()).unwrap();
|
||||||
|
@ -60,6 +60,7 @@ async fn try_forgot_password(
|
|||||||
.await
|
.await
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
error!("Failed to load user for forgot-password: {e}");
|
error!("Failed to load user for forgot-password: {e}");
|
||||||
|
eprintln!("Failed to load user for forgot-password: {e}");
|
||||||
Error::DatabaseError
|
Error::DatabaseError
|
||||||
})?
|
})?
|
||||||
.ok_or_else(|| JsonError::new("Please check the email"))?;
|
.ok_or_else(|| JsonError::new("Please check the email"))?;
|
||||||
@ -87,6 +88,7 @@ async fn try_forgot_password(
|
|||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
error!("Failed to send forgot pass email event: {e}");
|
error!("Failed to send forgot pass email event: {e}");
|
||||||
|
eprintln!("Failed to send forgot pass email event: {e}");
|
||||||
Err(
|
Err(
|
||||||
JsonError::new("Something went wrong. Please contact administrator.")
|
JsonError::new("Something went wrong. Please contact administrator.")
|
||||||
.with_status(StatusCode::INTERNAL_SERVER_ERROR),
|
.with_status(StatusCode::INTERNAL_SERVER_ERROR),
|
||||||
@ -112,6 +114,7 @@ mod tests {
|
|||||||
use sea_orm::Database;
|
use sea_orm::Database;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use squadron_contract::deadpool_redis;
|
use squadron_contract::deadpool_redis;
|
||||||
|
use squadron_contract::event_bus::Client as EventBusClient;
|
||||||
use tracing_test::traced_test;
|
use tracing_test::traced_test;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
@ -152,6 +155,8 @@ mod tests {
|
|||||||
.app_data(Data::new($session_storage.clone()))
|
.app_data(Data::new($session_storage.clone()))
|
||||||
.app_data($db.clone())
|
.app_data($db.clone())
|
||||||
.app_data(Data::new(redis))
|
.app_data(Data::new(redis))
|
||||||
|
.app_data(Data::new(EventBusClient::new_succ_mock()))
|
||||||
|
.app_data(Data::new(PasswordResetSecret::new("ahsdhy9asd".to_string())))
|
||||||
.wrap(actix_web::middleware::NormalizePath::trim())
|
.wrap(actix_web::middleware::NormalizePath::trim())
|
||||||
.wrap(actix_web::middleware::Logger::default())
|
.wrap(actix_web::middleware::Logger::default())
|
||||||
.wrap(factory)
|
.wrap(factory)
|
||||||
@ -171,7 +176,16 @@ mod tests {
|
|||||||
}
|
}
|
||||||
ActiveModel {
|
ActiveModel {
|
||||||
instance_name: Set("Plan Free".into()),
|
instance_name: Set("Plan Free".into()),
|
||||||
|
is_telemetry_enabled: Set(true),
|
||||||
|
is_support_required: Set(true),
|
||||||
is_setup_done: Set(true),
|
is_setup_done: Set(true),
|
||||||
|
is_signup_screen_visited: Set(true),
|
||||||
|
is_verified: Set(true),
|
||||||
|
user_count: Set(0),
|
||||||
|
instance_id: Set(random_hex(12)),
|
||||||
|
api_key: Set(random_hex(8)),
|
||||||
|
version: Set(env!("CARGO_PKG_VERSION").to_string()),
|
||||||
|
last_checked_at: Set(chrono::Utc::now().fixed_offset()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
.save(&**db)
|
.save(&**db)
|
||||||
@ -233,7 +247,7 @@ mod tests {
|
|||||||
.set_json(Input {
|
.set_json(Input {
|
||||||
email: "a89hsd9hasd@dsa9hs8.com".to_string(),
|
email: "a89hsd9hasd@dsa9hs8.com".to_string(),
|
||||||
})
|
})
|
||||||
.uri("/forgot-password")
|
.uri("http://my-sq.mock/forgot-password")
|
||||||
.method(Method::POST)
|
.method(Method::POST)
|
||||||
.to_request();
|
.to_request();
|
||||||
|
|
||||||
@ -258,7 +272,7 @@ mod tests {
|
|||||||
.set_json(Input {
|
.set_json(Input {
|
||||||
email: format!("no_user_forgot::??_pass@example.11"),
|
email: format!("no_user_forgot::??_pass@example.11"),
|
||||||
})
|
})
|
||||||
.uri("/forgot-password")
|
.uri("http://my-sq.mock/forgot-password")
|
||||||
.method(Method::POST)
|
.method(Method::POST)
|
||||||
.to_request();
|
.to_request();
|
||||||
|
|
||||||
@ -283,13 +297,13 @@ mod tests {
|
|||||||
.set_json(Input {
|
.set_json(Input {
|
||||||
email: user.email.unwrap(),
|
email: user.email.unwrap(),
|
||||||
})
|
})
|
||||||
.uri("/forgot-password")
|
.uri("http://my-sq.mock/forgot-password")
|
||||||
.method(Method::POST)
|
.method(Method::POST)
|
||||||
.to_request();
|
.to_request();
|
||||||
|
|
||||||
let resp = test::call_service(&app, req).await;
|
let resp = test::call_service(&app, req).await;
|
||||||
|
|
||||||
assert_eq!(resp.status(), StatusCode::BAD_REQUEST);
|
assert_eq!(resp.status(), StatusCode::OK);
|
||||||
|
|
||||||
let body = resp.into_body();
|
let body = resp.into_body();
|
||||||
let json: serde_json::Value =
|
let json: serde_json::Value =
|
||||||
|
@ -7,8 +7,8 @@ use reqwest::StatusCode;
|
|||||||
use sea_orm::{DatabaseConnection, DatabaseTransaction, EntityTrait, Set};
|
use sea_orm::{DatabaseConnection, DatabaseTransaction, EntityTrait, Set};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
use super::auth_http_response;
|
|
||||||
use super::password::PassValidity;
|
use super::password::PassValidity;
|
||||||
|
use super::{auth_http_response, random_hex};
|
||||||
use crate::extractors::RequireInstanceConfigured;
|
use crate::extractors::RequireInstanceConfigured;
|
||||||
use crate::models::{
|
use crate::models::{
|
||||||
Error, JsonError, JsonErrorDetails, PasswordResetSecret, PasswordResetTimeout,
|
Error, JsonError, JsonErrorDetails, PasswordResetSecret, PasswordResetTimeout,
|
||||||
@ -188,7 +188,16 @@ mod tests {
|
|||||||
}
|
}
|
||||||
ActiveModel {
|
ActiveModel {
|
||||||
instance_name: Set("Plan Free".into()),
|
instance_name: Set("Plan Free".into()),
|
||||||
|
is_telemetry_enabled: Set(true),
|
||||||
|
is_support_required: Set(true),
|
||||||
is_setup_done: Set(true),
|
is_setup_done: Set(true),
|
||||||
|
is_signup_screen_visited: Set(true),
|
||||||
|
is_verified: Set(true),
|
||||||
|
user_count: Set(0),
|
||||||
|
instance_id: Set(random_hex(12)),
|
||||||
|
api_key: Set(random_hex(8)),
|
||||||
|
version: Set(env!("CARGO_PKG_VERSION").to_string()),
|
||||||
|
last_checked_at: Set(chrono::Utc::now().fixed_offset()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
.save(&**db)
|
.save(&**db)
|
||||||
|
@ -4,6 +4,7 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
async-trait = "0.1.77"
|
||||||
bincode = "1.3.3"
|
bincode = "1.3.3"
|
||||||
chrono = { version = "0.4.31", default-features = false, features = ["serde", "std", "libc", "pure-rust-locales", "clock"] }
|
chrono = { version = "0.4.31", default-features = false, features = ["serde", "std", "libc", "pure-rust-locales", "clock"] }
|
||||||
deadpool-redis = { version = "0.14.0", features = ["serde"] }
|
deadpool-redis = { version = "0.14.0", features = ["serde"] }
|
||||||
|
@ -14,9 +14,65 @@ pub enum EventBusError {
|
|||||||
Serialize(#[from] bincode::Error),
|
Serialize(#[from] bincode::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[async_trait::async_trait]
|
||||||
|
pub trait NativeClient {
|
||||||
|
async fn publish(
|
||||||
|
&self,
|
||||||
|
topic: messages::Topic,
|
||||||
|
msg: messages::Msg,
|
||||||
|
qos: QoS,
|
||||||
|
retain: bool,
|
||||||
|
) -> Result<(), EventBusError>;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[async_trait::async_trait]
|
||||||
|
impl NativeClient for rumqttc::AsyncClient {
|
||||||
|
async fn publish(
|
||||||
|
&self,
|
||||||
|
topic: messages::Topic,
|
||||||
|
msg: messages::Msg,
|
||||||
|
qos: QoS,
|
||||||
|
retain: bool,
|
||||||
|
) -> Result<(), EventBusError> {
|
||||||
|
self.publish(topic.as_str(), qos, retain, msg.try_as_bytes()?)
|
||||||
|
.await?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct SuccMockClient;
|
||||||
|
|
||||||
|
#[async_trait::async_trait]
|
||||||
|
impl NativeClient for SuccMockClient {
|
||||||
|
async fn publish(
|
||||||
|
&self,
|
||||||
|
_topic: messages::Topic,
|
||||||
|
_msg: messages::Msg,
|
||||||
|
_qos: QoS,
|
||||||
|
_retain: bool,
|
||||||
|
) -> Result<(), EventBusError> {
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct FailMockClient;
|
||||||
|
|
||||||
|
#[async_trait::async_trait]
|
||||||
|
impl NativeClient for FailMockClient {
|
||||||
|
async fn publish(
|
||||||
|
&self,
|
||||||
|
_topic: messages::Topic,
|
||||||
|
_msg: messages::Msg,
|
||||||
|
_qos: QoS,
|
||||||
|
_retain: bool,
|
||||||
|
) -> Result<(), EventBusError> {
|
||||||
|
Err(EventBusError::NativeClient)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Client {
|
pub struct Client {
|
||||||
client: Arc<Mutex<rumqttc::AsyncClient>>,
|
client: Arc<Mutex<dyn NativeClient + 'static + Send + Sync>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Client {
|
impl Client {
|
||||||
@ -26,6 +82,18 @@ impl Client {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn new_succ_mock() -> Self {
|
||||||
|
Self {
|
||||||
|
client: Arc::new(Mutex::new(SuccMockClient)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new_fail_mock() -> Self {
|
||||||
|
Self {
|
||||||
|
client: Arc::new(Mutex::new(FailMockClient)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub async fn publish(
|
pub async fn publish(
|
||||||
&self,
|
&self,
|
||||||
topic: messages::Topic,
|
topic: messages::Topic,
|
||||||
@ -36,9 +104,7 @@ impl Client {
|
|||||||
let Ok(client) = self.client.lock() else {
|
let Ok(client) = self.client.lock() else {
|
||||||
return Err(EventBusError::NativeClient);
|
return Err(EventBusError::NativeClient);
|
||||||
};
|
};
|
||||||
client
|
client.publish(topic, msg, qos, retain).await?;
|
||||||
.publish(topic.as_str(), qos, retain, msg.try_as_bytes()?)
|
|
||||||
.await?;
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
284
plane_db.sql
284
plane_db.sql
@ -96,8 +96,8 @@ CREATE TABLE users (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE workspaces (
|
CREATE TABLE workspaces (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(80) NOT NULL,
|
name character varying(80) NOT NULL,
|
||||||
logo character varying(200),
|
logo character varying(200),
|
||||||
@ -113,8 +113,8 @@ CREATE TABLE workspaces (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE projects (
|
CREATE TABLE projects (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
@ -147,8 +147,8 @@ CREATE TABLE projects (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE modules (
|
CREATE TABLE modules (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
@ -173,8 +173,8 @@ CREATE TABLE modules (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE pages (
|
CREATE TABLE pages (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description jsonb NOT NULL,
|
description jsonb NOT NULL,
|
||||||
@ -198,8 +198,8 @@ CREATE TABLE pages (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE states (
|
CREATE TABLE states (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
@ -221,8 +221,8 @@ CREATE TABLE states (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issues (
|
CREATE TABLE issues (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description jsonb NOT NULL,
|
description jsonb NOT NULL,
|
||||||
@ -252,8 +252,8 @@ CREATE TABLE issues (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_comments (
|
CREATE TABLE issue_comments (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
comment_stripped text NOT NULL,
|
comment_stripped text NOT NULL,
|
||||||
attachments character varying(200)[] NOT NULL,
|
attachments character varying(200)[] NOT NULL,
|
||||||
@ -276,8 +276,8 @@ CREATE TABLE issue_comments (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE cycles (
|
CREATE TABLE cycles (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
@ -299,8 +299,8 @@ CREATE TABLE cycles (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE estimates (
|
CREATE TABLE estimates (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
@ -315,8 +315,8 @@ CREATE TABLE estimates (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE analytic_views (
|
CREATE TABLE analytic_views (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
@ -331,8 +331,8 @@ CREATE TABLE analytic_views (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE api_activity_logs (
|
CREATE TABLE api_activity_logs (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
token_identifier character varying(255) NOT NULL,
|
token_identifier character varying(255) NOT NULL,
|
||||||
path character varying(255) NOT NULL,
|
path character varying(255) NOT NULL,
|
||||||
@ -350,8 +350,8 @@ CREATE TABLE api_activity_logs (
|
|||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE api_tokens (
|
CREATE TABLE api_tokens (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
token character varying(255) NOT NULL,
|
token character varying(255) NOT NULL,
|
||||||
label character varying(255) NOT NULL,
|
label character varying(255) NOT NULL,
|
||||||
@ -449,8 +449,8 @@ CREATE TABLE authtoken_token (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE comment_reactions (
|
CREATE TABLE comment_reactions (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
reaction character varying(20) NOT NULL,
|
reaction character varying(20) NOT NULL,
|
||||||
actor_id uuid NOT NULL,
|
actor_id uuid NOT NULL,
|
||||||
@ -466,8 +466,8 @@ CREATE TABLE comment_reactions (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE cycle_favorites (
|
CREATE TABLE cycle_favorites (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
cycle_id uuid NOT NULL REFERENCES cycles (id),
|
cycle_id uuid NOT NULL REFERENCES cycles (id),
|
||||||
@ -482,8 +482,8 @@ CREATE TABLE cycle_favorites (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE cycle_issues (
|
CREATE TABLE cycle_issues (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
cycle_id uuid NOT NULL REFERENCES cycles (id),
|
cycle_id uuid NOT NULL REFERENCES cycles (id),
|
||||||
@ -678,8 +678,8 @@ CREATE TABLE django_session (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE estimate_points (
|
CREATE TABLE estimate_points (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
key integer NOT NULL,
|
key integer NOT NULL,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
@ -696,8 +696,8 @@ CREATE TABLE estimate_points (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE exporters (
|
CREATE TABLE exporters (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
project uuid[],
|
project uuid[],
|
||||||
provider character varying(50) NOT NULL,
|
provider character varying(50) NOT NULL,
|
||||||
@ -717,8 +717,8 @@ CREATE TABLE exporters (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE file_assets (
|
CREATE TABLE file_assets (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
attributes jsonb NOT NULL,
|
attributes jsonb NOT NULL,
|
||||||
asset character varying(100) NOT NULL,
|
asset character varying(100) NOT NULL,
|
||||||
@ -733,8 +733,8 @@ CREATE TABLE file_assets (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE github_comment_syncs (
|
CREATE TABLE github_comment_syncs (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
repo_comment_id bigint NOT NULL,
|
repo_comment_id bigint NOT NULL,
|
||||||
comment_id uuid NOT NULL,
|
comment_id uuid NOT NULL,
|
||||||
@ -750,8 +750,8 @@ CREATE TABLE github_comment_syncs (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE github_issue_syncs (
|
CREATE TABLE github_issue_syncs (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
repo_issue_id bigint NOT NULL,
|
repo_issue_id bigint NOT NULL,
|
||||||
github_issue_id bigint NOT NULL,
|
github_issue_id bigint NOT NULL,
|
||||||
@ -769,8 +769,8 @@ CREATE TABLE github_issue_syncs (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE github_repositories (
|
CREATE TABLE github_repositories (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(500) NOT NULL,
|
name character varying(500) NOT NULL,
|
||||||
url character varying(200),
|
url character varying(200),
|
||||||
@ -788,8 +788,8 @@ CREATE TABLE github_repositories (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE github_repository_syncs (
|
CREATE TABLE github_repository_syncs (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
credentials jsonb NOT NULL,
|
credentials jsonb NOT NULL,
|
||||||
actor_id uuid NOT NULL,
|
actor_id uuid NOT NULL,
|
||||||
@ -807,8 +807,8 @@ CREATE TABLE github_repository_syncs (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE global_views (
|
CREATE TABLE global_views (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
@ -827,8 +827,8 @@ CREATE TABLE global_views (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE importers (
|
CREATE TABLE importers (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
service character varying(50) NOT NULL,
|
service character varying(50) NOT NULL,
|
||||||
status character varying(50) NOT NULL,
|
status character varying(50) NOT NULL,
|
||||||
@ -849,8 +849,8 @@ CREATE TABLE importers (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE inbox_issues (
|
CREATE TABLE inbox_issues (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
status integer NOT NULL,
|
status integer NOT NULL,
|
||||||
snoozed_till timestamp with time zone,
|
snoozed_till timestamp with time zone,
|
||||||
@ -871,8 +871,8 @@ CREATE TABLE inbox_issues (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE inboxes (
|
CREATE TABLE inboxes (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
@ -889,8 +889,8 @@ CREATE TABLE inboxes (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE instance_admins (
|
CREATE TABLE instance_admins (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
role roles NOT NULL,
|
role roles NOT NULL,
|
||||||
is_verified boolean NOT NULL,
|
is_verified boolean NOT NULL,
|
||||||
@ -905,8 +905,8 @@ CREATE TABLE instance_admins (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE instance_configurations (
|
CREATE TABLE instance_configurations (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
key character varying(100) NOT NULL,
|
key character varying(100) NOT NULL,
|
||||||
value text,
|
value text,
|
||||||
@ -921,8 +921,8 @@ CREATE TABLE instance_configurations (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE instances (
|
CREATE TABLE instances (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at timestamp with time zone NOT NULL DEFAULT NOW(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at timestamp with time zone NOT NULL DEFAULT NOW(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
instance_name character varying(255) NOT NULL,
|
instance_name character varying(255) NOT NULL,
|
||||||
whitelist_emails text,
|
whitelist_emails text,
|
||||||
@ -948,8 +948,8 @@ CREATE TABLE instances (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE integrations (
|
CREATE TABLE integrations (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at timestamp with time zone NOT NULL DEFAULT NOW(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at timestamp with time zone NOT NULL DEFAULT NOW(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
title character varying(400) NOT NULL,
|
title character varying(400) NOT NULL,
|
||||||
provider character varying(400) NOT NULL,
|
provider character varying(400) NOT NULL,
|
||||||
@ -972,8 +972,8 @@ CREATE TABLE integrations (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_activities (
|
CREATE TABLE issue_activities (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
verb character varying(255) NOT NULL,
|
verb character varying(255) NOT NULL,
|
||||||
field character varying(255),
|
field character varying(255),
|
||||||
@ -998,8 +998,8 @@ CREATE TABLE issue_activities (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_assignees (
|
CREATE TABLE issue_assignees (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
assignee_id uuid NOT NULL,
|
assignee_id uuid NOT NULL,
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
@ -1014,8 +1014,8 @@ CREATE TABLE issue_assignees (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_attachments (
|
CREATE TABLE issue_attachments (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
attributes jsonb NOT NULL,
|
attributes jsonb NOT NULL,
|
||||||
asset character varying(100) NOT NULL,
|
asset character varying(100) NOT NULL,
|
||||||
@ -1031,8 +1031,8 @@ CREATE TABLE issue_attachments (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_blockers (
|
CREATE TABLE issue_blockers (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
block_id uuid NOT NULL,
|
block_id uuid NOT NULL,
|
||||||
blocked_by_id uuid NOT NULL,
|
blocked_by_id uuid NOT NULL,
|
||||||
@ -1047,8 +1047,8 @@ CREATE TABLE issue_blockers (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_labels (
|
CREATE TABLE issue_labels (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
issue_id uuid NOT NULL REFERENCES issues (id),
|
issue_id uuid NOT NULL REFERENCES issues (id),
|
||||||
@ -1063,8 +1063,8 @@ CREATE TABLE issue_labels (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_links (
|
CREATE TABLE issue_links (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
title character varying(255),
|
title character varying(255),
|
||||||
url character varying(200) NOT NULL,
|
url character varying(200) NOT NULL,
|
||||||
@ -1081,8 +1081,8 @@ CREATE TABLE issue_links (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_mentions (
|
CREATE TABLE issue_mentions (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
issue_id uuid NOT NULL REFERENCES issues (id),
|
issue_id uuid NOT NULL REFERENCES issues (id),
|
||||||
@ -1097,8 +1097,8 @@ CREATE TABLE issue_mentions (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_properties (
|
CREATE TABLE issue_properties (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
properties jsonb NOT NULL,
|
properties jsonb NOT NULL,
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
@ -1113,8 +1113,8 @@ CREATE TABLE issue_properties (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_reactions (
|
CREATE TABLE issue_reactions (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
reaction character varying(20) NOT NULL,
|
reaction character varying(20) NOT NULL,
|
||||||
actor_id uuid NOT NULL,
|
actor_id uuid NOT NULL,
|
||||||
@ -1130,8 +1130,8 @@ CREATE TABLE issue_reactions (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_relations (
|
CREATE TABLE issue_relations (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
relation_type character varying(20) NOT NULL,
|
relation_type character varying(20) NOT NULL,
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
@ -1147,8 +1147,8 @@ CREATE TABLE issue_relations (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_sequences (
|
CREATE TABLE issue_sequences (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
sequence bigint NOT NULL,
|
sequence bigint NOT NULL,
|
||||||
deleted boolean NOT NULL,
|
deleted boolean NOT NULL,
|
||||||
@ -1165,8 +1165,8 @@ CREATE TABLE issue_sequences (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_subscribers (
|
CREATE TABLE issue_subscribers (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
issue_id uuid NOT NULL REFERENCES issues (id),
|
issue_id uuid NOT NULL REFERENCES issues (id),
|
||||||
@ -1181,8 +1181,8 @@ CREATE TABLE issue_subscribers (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_views (
|
CREATE TABLE issue_views (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
@ -1201,8 +1201,8 @@ CREATE TABLE issue_views (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE issue_votes (
|
CREATE TABLE issue_votes (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
vote integer NOT NULL,
|
vote integer NOT NULL,
|
||||||
actor_id uuid NOT NULL,
|
actor_id uuid NOT NULL,
|
||||||
@ -1218,8 +1218,8 @@ CREATE TABLE issue_votes (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE labels (
|
CREATE TABLE labels (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
@ -1239,8 +1239,8 @@ CREATE TABLE labels (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE module_favorites (
|
CREATE TABLE module_favorites (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
module_id uuid NOT NULL REFERENCES modules (id),
|
module_id uuid NOT NULL REFERENCES modules (id),
|
||||||
@ -1255,8 +1255,8 @@ CREATE TABLE module_favorites (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE module_issues (
|
CREATE TABLE module_issues (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
issue_id uuid NOT NULL REFERENCES issues (id),
|
issue_id uuid NOT NULL REFERENCES issues (id),
|
||||||
@ -1271,8 +1271,8 @@ CREATE TABLE module_issues (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE module_links (
|
CREATE TABLE module_links (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
title character varying(255),
|
title character varying(255),
|
||||||
url character varying(200) NOT NULL,
|
url character varying(200) NOT NULL,
|
||||||
@ -1289,8 +1289,8 @@ CREATE TABLE module_links (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE module_members (
|
CREATE TABLE module_members (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
member_id uuid NOT NULL,
|
member_id uuid NOT NULL,
|
||||||
@ -1305,8 +1305,8 @@ CREATE TABLE module_members (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE notifications (
|
CREATE TABLE notifications (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
data jsonb,
|
data jsonb,
|
||||||
entity_identifier uuid,
|
entity_identifier uuid,
|
||||||
@ -1332,8 +1332,8 @@ CREATE TABLE notifications (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE page_blocks (
|
CREATE TABLE page_blocks (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description jsonb NOT NULL,
|
description jsonb NOT NULL,
|
||||||
@ -1355,8 +1355,8 @@ CREATE TABLE page_blocks (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE page_favorites (
|
CREATE TABLE page_favorites (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
page_id uuid NOT NULL REFERENCES pages (id),
|
page_id uuid NOT NULL REFERENCES pages (id),
|
||||||
@ -1371,8 +1371,8 @@ CREATE TABLE page_favorites (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE page_labels (
|
CREATE TABLE page_labels (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
label_id uuid NOT NULL,
|
label_id uuid NOT NULL,
|
||||||
@ -1387,8 +1387,8 @@ CREATE TABLE page_labels (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE page_logs (
|
CREATE TABLE page_logs (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
transaction uuid NOT NULL,
|
transaction uuid NOT NULL,
|
||||||
entity_identifier uuid,
|
entity_identifier uuid,
|
||||||
@ -1405,8 +1405,8 @@ CREATE TABLE page_logs (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE project_deploy_boards (
|
CREATE TABLE project_deploy_boards (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
anchor character varying(255) NOT NULL,
|
anchor character varying(255) NOT NULL,
|
||||||
comments boolean NOT NULL,
|
comments boolean NOT NULL,
|
||||||
@ -1425,8 +1425,8 @@ CREATE TABLE project_deploy_boards (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE project_favorites (
|
CREATE TABLE project_favorites (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
project_id uuid NOT NULL REFERENCES projects (id),
|
project_id uuid NOT NULL REFERENCES projects (id),
|
||||||
@ -1441,8 +1441,8 @@ CREATE TABLE project_favorites (
|
|||||||
|
|
||||||
CREATE TABLE project_identifiers (
|
CREATE TABLE project_identifiers (
|
||||||
id bigint NOT NULL PRIMARY KEY,
|
id bigint NOT NULL PRIMARY KEY,
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
name character varying(12) NOT NULL,
|
name character varying(12) NOT NULL,
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
project_id uuid NOT NULL REFERENCES projects (id),
|
project_id uuid NOT NULL REFERENCES projects (id),
|
||||||
@ -1467,8 +1467,8 @@ ALTER TABLE project_identifiers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDEN
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE project_member_invites (
|
CREATE TABLE project_member_invites (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
email character varying(255) NOT NULL,
|
email character varying(255) NOT NULL,
|
||||||
accepted boolean NOT NULL,
|
accepted boolean NOT NULL,
|
||||||
@ -1487,8 +1487,8 @@ CREATE TABLE project_member_invites (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE project_members (
|
CREATE TABLE project_members (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
comment text,
|
comment text,
|
||||||
role project_member_roles NOT NULL DEFAULT 'Member' :: project_member_roles,
|
role project_member_roles NOT NULL DEFAULT 'Member' :: project_member_roles,
|
||||||
@ -1509,8 +1509,8 @@ CREATE TABLE project_members (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE project_public_members (
|
CREATE TABLE project_public_members (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
member_id uuid NOT NULL,
|
member_id uuid NOT NULL,
|
||||||
@ -1524,8 +1524,8 @@ CREATE TABLE project_public_members (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE slack_project_syncs (
|
CREATE TABLE slack_project_syncs (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
access_token character varying(300) NOT NULL,
|
access_token character varying(300) NOT NULL,
|
||||||
scopes text NOT NULL,
|
scopes text NOT NULL,
|
||||||
@ -1546,8 +1546,8 @@ CREATE TABLE slack_project_syncs (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE social_login_connections (
|
CREATE TABLE social_login_connections (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
medium character varying(20) NOT NULL,
|
medium character varying(20) NOT NULL,
|
||||||
last_login_at timestamp with time zone,
|
last_login_at timestamp with time zone,
|
||||||
@ -1564,8 +1564,8 @@ CREATE TABLE social_login_connections (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE team_members (
|
CREATE TABLE team_members (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
member_id uuid NOT NULL,
|
member_id uuid NOT NULL,
|
||||||
@ -1579,8 +1579,8 @@ CREATE TABLE team_members (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE teams (
|
CREATE TABLE teams (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(255) NOT NULL,
|
name character varying(255) NOT NULL,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
@ -1686,8 +1686,8 @@ ALTER TABLE users_user_permissions ALTER COLUMN id ADD GENERATED BY DEFAULT AS I
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE view_favorites (
|
CREATE TABLE view_favorites (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
project_id uuid NOT NULL REFERENCES projects (id),
|
project_id uuid NOT NULL REFERENCES projects (id),
|
||||||
@ -1702,8 +1702,8 @@ CREATE TABLE view_favorites (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE webhook_logs (
|
CREATE TABLE webhook_logs (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
event_type character varying(255),
|
event_type character varying(255),
|
||||||
request_method character varying(10),
|
request_method character varying(10),
|
||||||
@ -1725,8 +1725,8 @@ CREATE TABLE webhook_logs (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE webhooks (
|
CREATE TABLE webhooks (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
url character varying(200) NOT NULL,
|
url character varying(200) NOT NULL,
|
||||||
is_active boolean NOT NULL,
|
is_active boolean NOT NULL,
|
||||||
@ -1746,8 +1746,8 @@ CREATE TABLE webhooks (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE workspace_integrations (
|
CREATE TABLE workspace_integrations (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
metadata jsonb NOT NULL,
|
metadata jsonb NOT NULL,
|
||||||
config jsonb NOT NULL,
|
config jsonb NOT NULL,
|
||||||
@ -1764,8 +1764,8 @@ CREATE TABLE workspace_integrations (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE workspace_member_invites (
|
CREATE TABLE workspace_member_invites (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
email character varying(255) NOT NULL,
|
email character varying(255) NOT NULL,
|
||||||
accepted boolean NOT NULL,
|
accepted boolean NOT NULL,
|
||||||
@ -1783,8 +1783,8 @@ CREATE TABLE workspace_member_invites (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE workspace_members (
|
CREATE TABLE workspace_members (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
role roles NOT NULL DEFAULT 'Member' :: roles,
|
role roles NOT NULL DEFAULT 'Member' :: roles,
|
||||||
created_by_id uuid,
|
created_by_id uuid,
|
||||||
@ -1803,8 +1803,8 @@ CREATE TABLE workspace_members (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE workspace_themes (
|
CREATE TABLE workspace_themes (
|
||||||
created_at timestamp with time zone NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
updated_at timestamp with time zone NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
|
||||||
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
id uuid NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||||
name character varying(300) NOT NULL,
|
name character varying(300) NOT NULL,
|
||||||
colors jsonb NOT NULL,
|
colors jsonb NOT NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user