Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
NewLifeProject
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Юнусов Ибрагим
NewLifeProject
Commits
ad067cc2
Commit
ad067cc2
authored
Jul 18, 2022
by
Юнусов Ибрагим
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Создал миграцию
parent
e4b3150f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
129 additions
and
0 deletions
+129
-0
20220718150011_Init.Designer.cs
NewStores/Store/Migrations/20220718150011_Init.Designer.cs
+49
-0
20220718150011_Init.cs
NewStores/Store/Migrations/20220718150011_Init.cs
+33
-0
AppDbContextModelSnapshot.cs
NewStores/Store/Migrations/AppDbContextModelSnapshot.cs
+47
-0
No files found.
NewStores/Store/Migrations/20220718150011_Init.Designer.cs
0 → 100644
View file @
ad067cc2
// <auto-generated />
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore.Infrastructure
;
using
Microsoft.EntityFrameworkCore.Migrations
;
using
Microsoft.EntityFrameworkCore.Storage.ValueConversion
;
using
Npgsql.EntityFrameworkCore.PostgreSQL.Metadata
;
using
Store.Models
;
#
nullable
disable
namespace
Store.Migrations
{
[
DbContext
(
typeof
(
AppDbContext
))]
[
Migration
(
"20220718150011_Init"
)]
partial
class
Init
{
protected
override
void
BuildTargetModel
(
ModelBuilder
modelBuilder
)
{
#pragma warning disable 612, 618
modelBuilder
.
HasAnnotation
(
"ProductVersion"
,
"6.0.7"
)
.
HasAnnotation
(
"Relational:MaxIdentifierLength"
,
63
);
NpgsqlModelBuilderExtensions
.
UseIdentityByDefaultColumns
(
modelBuilder
);
modelBuilder
.
Entity
(
"Store.Models.User"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"integer"
);
NpgsqlPropertyBuilderExtensions
.
UseIdentityByDefaultColumn
(
b
.
Property
<
int
>(
"Id"
));
b
.
Property
<
string
>(
"Email"
)
.
IsRequired
()
.
HasColumnType
(
"text"
);
b
.
Property
<
string
>(
"Password"
)
.
IsRequired
()
.
HasColumnType
(
"text"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Users"
);
});
#pragma warning restore 612, 618
}
}
}
NewStores/Store/Migrations/20220718150011_Init.cs
0 → 100644
View file @
ad067cc2
using
Microsoft.EntityFrameworkCore.Migrations
;
using
Npgsql.EntityFrameworkCore.PostgreSQL.Metadata
;
#
nullable
disable
namespace
Store.Migrations
{
public
partial
class
Init
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
CreateTable
(
name
:
"Users"
,
columns
:
table
=>
new
{
Id
=
table
.
Column
<
int
>(
type
:
"integer"
,
nullable
:
false
)
.
Annotation
(
"Npgsql:ValueGenerationStrategy"
,
NpgsqlValueGenerationStrategy
.
IdentityByDefaultColumn
),
Email
=
table
.
Column
<
string
>(
type
:
"text"
,
nullable
:
false
),
Password
=
table
.
Column
<
string
>(
type
:
"text"
,
nullable
:
false
)
},
constraints
:
table
=>
{
table
.
PrimaryKey
(
"PK_Users"
,
x
=>
x
.
Id
);
});
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
DropTable
(
name
:
"Users"
);
}
}
}
NewStores/Store/Migrations/AppDbContextModelSnapshot.cs
0 → 100644
View file @
ad067cc2
// <auto-generated />
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore.Infrastructure
;
using
Microsoft.EntityFrameworkCore.Storage.ValueConversion
;
using
Npgsql.EntityFrameworkCore.PostgreSQL.Metadata
;
using
Store.Models
;
#
nullable
disable
namespace
Store.Migrations
{
[
DbContext
(
typeof
(
AppDbContext
))]
partial
class
AppDbContextModelSnapshot
:
ModelSnapshot
{
protected
override
void
BuildModel
(
ModelBuilder
modelBuilder
)
{
#pragma warning disable 612, 618
modelBuilder
.
HasAnnotation
(
"ProductVersion"
,
"6.0.7"
)
.
HasAnnotation
(
"Relational:MaxIdentifierLength"
,
63
);
NpgsqlModelBuilderExtensions
.
UseIdentityByDefaultColumns
(
modelBuilder
);
modelBuilder
.
Entity
(
"Store.Models.User"
,
b
=>
{
b
.
Property
<
int
>(
"Id"
)
.
ValueGeneratedOnAdd
()
.
HasColumnType
(
"integer"
);
NpgsqlPropertyBuilderExtensions
.
UseIdentityByDefaultColumn
(
b
.
Property
<
int
>(
"Id"
));
b
.
Property
<
string
>(
"Email"
)
.
IsRequired
()
.
HasColumnType
(
"text"
);
b
.
Property
<
string
>(
"Password"
)
.
IsRequired
()
.
HasColumnType
(
"text"
);
b
.
HasKey
(
"Id"
);
b
.
ToTable
(
"Users"
);
});
#pragma warning restore 612, 618
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment