rename model
This commit is contained in:
parent
9ed583ecdb
commit
a958842bf6
2 changed files with 5 additions and 5 deletions
|
|
@ -17,13 +17,13 @@ POSTGRES_CONTAINER_NAME=$(docker compose ps -q postgres | xargs docker inspect -
|
||||||
|
|
||||||
# Connect to the Postgres container and insert the fake record into the app_invite table
|
# Connect to the Postgres container and insert the fake record into the app_invite table
|
||||||
docker exec -i "$POSTGRES_CONTAINER_NAME" psql -v -U "$POSTGRES_USER" -d "$POSTGRES_DB" -h localhost -p 5432 -c "
|
docker exec -i "$POSTGRES_CONTAINER_NAME" psql -v -U "$POSTGRES_USER" -d "$POSTGRES_DB" -h localhost -p 5432 -c "
|
||||||
INSERT INTO app_invite (uuid, inviter_npub, created_at)
|
INSERT INTO app_invite_created (uuid, inviter_npub, created_at)
|
||||||
VALUES ('$UUID', '$INVITER_NPUB', '$CREATED_AT')
|
VALUES ('$UUID', '$INVITER_NPUB', '$CREATED_AT')
|
||||||
RETURNING *;
|
RETURNING *;
|
||||||
"
|
"
|
||||||
|
|
||||||
# Print the generated values
|
# Print the generated values
|
||||||
echo "Inserted app_invite Record:"
|
echo "Inserted app_invite_created Record:"
|
||||||
echo "UUID: $UUID"
|
echo "UUID: $UUID"
|
||||||
echo "Inviter Npub: $INVITER_NPUB"
|
echo "Inviter Npub: $INVITER_NPUB"
|
||||||
echo "Created At: $CREATED_AT"
|
echo "Created At: $CREATED_AT"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
const { DataTypes } = require('sequelize');
|
const { DataTypes } = require('sequelize');
|
||||||
const sequelize = require('../database');
|
const sequelize = require('../database');
|
||||||
|
|
||||||
const AppInvite = sequelize.define('AppInvite', {
|
const AppInviteCreated = sequelize.define('AppInviteCreated', {
|
||||||
uuid: {
|
uuid: {
|
||||||
type: DataTypes.UUID,
|
type: DataTypes.UUID,
|
||||||
allowNull: false,
|
allowNull: false,
|
||||||
|
|
@ -17,7 +17,7 @@ const AppInvite = sequelize.define('AppInvite', {
|
||||||
allowNull: false
|
allowNull: false
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
tableName: 'app_invite'
|
tableName: 'app_invite_created'
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = AppInvite;
|
module.exports = AppInviteCreated;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue